[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 10 of 18] tools/libvchan: fix build errors caused by -Werror in node-select.c



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)
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.