Re: (void)foo or __unused foo ?

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Fri, 27 Jul 2012 18:34:10 +0000
In message <20120727125134.GA58187_at_onelab2.iet.unipi.it>, Luigi Rizzo writes:

>A comment might be used to explain the intention in even more detail:
>
>	(void)foo;	/* unused on XyBSD and Babbage-OS */

Comments are noise which compilers and static checkers cannot and
should not examine.

The intent should be expressed where compilers and static checkers
can see it.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk_at_FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
Received on Fri Jul 27 2012 - 16:34:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC