From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c Date: Sat, 21 May 2011 07:50:15 +0100 Message-ID: References: <20110520161133.GA18169@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110520161133.GA18169@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Olaf Hering Cc: "xen-devel@lists.xensource.com" , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 20/05/2011 17:11, "Olaf Hering" wrote: > 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? ...and the ifdefs? Ugly. And for no bugs fixed so far in the hypervisor. As I said, I don't maintain the toolstack, those guys can make their own choice. -- Keir > Olaf > > > gcc-4.6 compile fix: build with -Wno-unused-but-set-variable > > Avoid "error: variable 'unused' set but not used > [-Werror=unused-but-set-variable]" > with gcc 4.6. > > Signed-off-by: Olaf Hering > > --- > 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))