Date: Wed, 30 Jan 2002 20:27:09 +0100 From: Jens Schweikhardt <schweikh@schweikhardt.net> To: Michael Henry <aviast@yahoo.com> Cc: freebsd-standards@freebsd.org Subject: Re: pathchk Message-ID: <20020130202709.B970@schweikhardt.net> In-Reply-To: <20020130094110.16065.qmail@web14606.mail.yahoo.com>; from aviast@yahoo.com on Wed, Jan 30, 2002 at 09:41:10AM %2B0000 References: <20020130094110.16065.qmail@web14606.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020130202709.B970>