From owner-freebsd-current@FreeBSD.ORG Tue Jun 16 10:40:32 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 A48D4106566B for ; Tue, 16 Jun 2009 10:40:32 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E701A8FC0A for ; Tue, 16 Jun 2009 10:40:31 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA04020; Tue, 16 Jun 2009 13:20:44 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4A3771FC.7030301@freebsd.org> Date: Tue, 16 Jun 2009 13:20:44 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: Marcel Moolenaar References: <20090615181555.GA52009@freebsd.org> <4A369529.5090004@freebsd.org> <20090615185812.GA67104@freebsd.org> <53E03A0A-8846-4EED-AE95-A15960FC6724@mac.com> In-Reply-To: <53E03A0A-8846-4EED-AE95-A15960FC6724@mac.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Roman Divacky , Sam Leffler , current@freebsd.org Subject: Re: [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: Tue, 16 Jun 2009 10:40:32 -0000 on 15/06/2009 22:38 Marcel Moolenaar said the following: > If the patch is all we need to compile the kernel with the warning > enabled and knowing that the warning has already found real bugs, > then it's a no-brainer to me: commit. I agree - if FOO is a function-like or complete-statement-like macro than it is more consistent to expand it to no-op statement than to nothing. (I am not sure if the same is true for other type of macros, e.g. expression-like ones). BTW, I think that this is a very typical practice, many C projects that I worked on used this convention. Our assert.h also does this. -- Andriy Gapon