[RFC]: (void)0 instead of empty defines

Roman Divacky rdivacky at freebsd.org
Mon Jun 15 18:16:06 UTC 2009


hi

in many places we do something like

#ifdef SOMETHING
#define FOO some_code
#else
#define FOO
#endif


I propose to change the second FOO to (void)0 in many places to

1) let this compile cleanly with clang. Clang warns in many places
about
		if (cond)
			FOO;

which has empty if body

2) enforces ; at the end of the expression

this does not cost us nothing so I hope this change is ok.

patch at: http://www.vlakno.cz/~rdivacky/void-zero.patch                                                                                                         

what do you think?

roman

p.s. there's also ACPI_DEBUG_PRINT in contrib/acpica which I hope
jkim might handle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090615/b1c74c0b/attachment.pgp


More information about the freebsd-current mailing list