From owner-freebsd-arch Thu Aug 16 23:59: 9 2001 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id AC71337B406 for ; Thu, 16 Aug 2001 23:59:06 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id B769E81D07; Fri, 17 Aug 2001 01:59:06 -0500 (CDT) Date: Fri, 17 Aug 2001 01:59:06 -0500 From: Alfred Perlstein To: Bruce Evans Cc: Mark Murray , arch@FreeBSD.ORG Subject: Re: Style 9 nitpicking question Message-ID: <20010817015906.Q38066@elvis.mu.org> References: <200108161551.f7GFpLK72129@grimreaper.grondar.za> <20010817162340.O34503-100000@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010817162340.O34503-100000@besplex.bde.org>; from bde@zeta.org.au on Fri, Aug 17, 2001 at 04:31:36PM +1000 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Bruce Evans [010817 01:40] wrote: > On Thu, 16 Aug 2001, Mark Murray wrote: > > > Sorta :-) Its often not a useful warning (most particularly for > > certain functions), and the (void) cast offends me because it is > > useless and obfuscating. > > I don't like it much either, but it's normal practice in BSD code. Actually it's quite useful, it means: "I the author of this code am fully aware that this function returns a value, however I know that it either will always have a certain outcome, or that the outcome doesn't matter because I'm attempting to salvage something, or that at this point a failure is of no concern." I'm sure one could add to that list, imo it's good programming style to do so when justified, however it's not acceptable just to do that in order to give the false impression of the previous statements. -- -Alfred Perlstein [alfred@freebsd.org] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message