From owner-freebsd-current@FreeBSD.ORG Mon Jun 15 18:16:05 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95EE1106564A for ; Mon, 15 Jun 2009 18:16:05 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3C78FC1B for ; Mon, 15 Jun 2009 18:16:03 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id AE53A9CB0E6; Mon, 15 Jun 2009 20:15:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UVYyx2t41yoi; Mon, 15 Jun 2009 20:15:56 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 029449CB19F; Mon, 15 Jun 2009 20:15:55 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n5FIFt2S060617; Mon, 15 Jun 2009 20:15:55 +0200 (CEST) (envelope-from rdivacky) Date: Mon, 15 Jun 2009 20:15:55 +0200 From: Roman Divacky To: current@freebsd.org Message-ID: <20090615181555.GA52009@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: jkim@freebsd.org Subject: [RFC]: (void)0 instead of empty defines X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 18:16:06 -0000 --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--