WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Keir Fraser <keir@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH 03 of 45] gcc-4.6 compile fix: tools/xenstore/xenstored_core.c
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Fri, 20 May 2011 18:11:33 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Delivery-date: Fri, 20 May 2011 09:13:37 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1305907900; l=1109; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=d3YZdF81Dqnekthe2O7kjLaXPBM=; b=BMrHh5bjH5LadC2Gk8tayrH7781kSyfyGSRf/NTjxn79suQ0vpkhVVhuWn6adD82NEO rGciOOlEujXsPEVe8+n7TDKZIizA0CYFNgrKEAHtBIk2JelpAVQqaBq6ARokZTON45YOz zLN00bIDHLfbTlsE/rZv04wAOH4Wpj8cBxw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C9FC4011.2D889%keir@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20110520143846.GA17222@xxxxxxxxx> <C9FC4011.2D889%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
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?

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 <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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>