From owner-freebsd-standards Wed Jan 30 12: 2: 8 2002 Delivered-To: freebsd-standards@freebsd.org Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by hub.freebsd.org (Postfix) with ESMTP id F301337B402 for ; Wed, 30 Jan 2002 12:02:05 -0800 (PST) Received: from bremen.shuttle.de (localhost [127.0.0.1]) by bremen.shuttle.de (Postfix) with ESMTP id 726C017D15; Wed, 30 Jan 2002 21:02:04 +0100 (CET) Received: (from uucp@localhost) by bremen.shuttle.de (8.12.1/8.12.1/Debian -5) with UUCP id g0UK24Rl007012; Wed, 30 Jan 2002 21:02:04 +0100 Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.11.6/8.11.6) id g0UJR9I14817; Wed, 30 Jan 2002 20:27:09 +0100 (CET) (envelope-from schweikh) Date: Wed, 30 Jan 2002 20:27:09 +0100 From: Jens Schweikhardt To: Michael Henry Cc: freebsd-standards@freebsd.org Subject: Re: pathchk Message-ID: <20020130202709.B970@schweikhardt.net> References: <20020130094110.16065.qmail@web14606.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020130094110.16065.qmail@web14606.mail.yahoo.com>; from aviast@yahoo.com on Wed, Jan 30, 2002 at 09:41:10AM +0000 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jan 30, 2002 at 09:41:10AM +0000, Michael Henry wrote: # # > = sizeof(char) is defined to be 1. # # Are you proposing replacing "sizeof(char)" with "1"? # Surely the former is more clear? No, the multiplication with sizeof(char) should just be removed. Sizeof(char) is cast in stone as per ISO 9899. # On another point: what is the general consensus on casting # functions to void? ie. "(void)fprintf(stderr, "%s\n", memoryerror);" # Am I the only one who finds this needless obfuscation of # the code irritating? (It's just a general question; nothing # aimed specifically at Chuck's code). A lot of lint implementations (and I think FreeBSD's too) will complain if you ignore the return value of non-void functions. A void cast is the canonical way to suppress this if there's really no point in testing the return value. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message