Date: Mon, 15 Jun 2009 20:15:55 +0200 From: Roman Divacky <rdivacky@freebsd.org> To: current@freebsd.org Cc: jkim@freebsd.org Subject: [RFC]: (void)0 instead of empty defines Message-ID: <20090615181555.GA52009@freebsd.org>
next in thread | raw e-mail | index | archive | help
--vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 = = =20 what do you think? roman p.s. there's also ACPI_DEBUG_PRINT in contrib/acpica which I hope jkim might handle --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAko2j9sACgkQLVEj6D3CBEzNUACggK81o7hhRvkdYZY9f7qxUXwp AC4Anj/0uBALxsz0TPl4JOyIrCnhraBW =v6i0 -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090615181555.GA52009>