From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 10 of 18] tools/libvchan: fix build errors caused by -Werror in node-select.c Date: Mon, 2 Apr 2012 21:54:25 +0200 Message-ID: <20120402195425.GA21392@aepfle.de> References: <1092e073b88e0aed775e.1333095927@probook.site> <20345.45252.747454.411523@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20345.45252.747454.411523@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Apr 02, Ian Jackson wrote: > Olaf Hering writes ("[Xen-devel] [PATCH 10 of 18] tools/libvchan: fix build errors caused by -Werror in node-select.c"): > > node-select.c: In function 'vchan_wr': > > node-select.c:60:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] > > This one is a question of coding style. Apparently libvchan uses > mixed statements/declarations, so this should be fixed by changing the > warning flags. This is from xen itself: .. -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement .. Are you saying -Wdeclaration-after-statement should be removed? diff -r 7c29b8723556 Config.mk --- a/Config.mk +++ b/Config.mk @@ -161,7 +161,7 @@ CFLAGS += -Wall -Wstrict-prototypes # and is over-zealous with the printf format lint CFLAGS-$(clang) += -Wno-parentheses -Wno-format -$(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) +$(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wno-declaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable)