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

Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c

On Fri, May 20, Keir Fraser wrote:

> Oh dear. ...

I think the following patch is good for 4.1 and older, but xen-unstable
should be fixed (and bugfixes backported) because disabling the warning
may hide bugs. Is adding the __attribute__ such a burden?


gcc-4.6 compile fix: build with -Wno-unused-but-set-variable

Avoid "error: variable 'unused' set but not used 
with gcc 4.6.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

 Config.mk |    1 +
 1 file changed, 1 insertion(+)

Index: xen-unstable.hg-4.2.23363/Config.mk
--- xen-unstable.hg-4.2.23363.orig/Config.mk
+++ xen-unstable.hg-4.2.23363/Config.mk
@@ -146,6 +146,7 @@ CFLAGS-$(clang) += -Wno-parentheses -Wno
 $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
 $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
+$(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable)
 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))

Xen-devel mailing list



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