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] Re: [PATCH 01/04] Kexec / Kdump: Generic code

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, Magnus Damm <magnus@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 01/04] Kexec / Kdump: Generic code
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 17 Oct 2006 15:49:12 +0100
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, Kazuo Moriwaka <moriwaka@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, magnus.damm@xxxxxxxxx, Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>, Isaku Yamahata <yamahata@xxxxxxxxxxxxx>, Horms <horms@xxxxxxxxxxxx>
Delivery-date: Tue, 17 Oct 2006 07:50:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1594FC1.2934%Keir.Fraser@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcbxK9sxGd60rl0fEduyIAAX8io7RQAz41cJ
Thread-topic: [Xen-devel] Re: [PATCH 01/04] Kexec / Kdump: Generic code
User-agent: Microsoft-Entourage/11.2.5.060620
On 16/10/06 15:03, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx> wrote:

> The comment attached to every use of xchg() is dubious. We don't specify
> warn_unused_result on that function so there's no good reason for the
> compiler to complain about discarding the result. If it's a reproducible
> problem it needs investigating. We shouldn't work around a broken compiler.

Ok, this seems to be a new 'feature' of gcc4, which has widened the class of
things it will complain about with -Wunused-value. Basically any cast of a
value causes the compiler to see an expression whose value must not be
discarded -- what a pain! This seems to me that it could mean that ignoring
return value of any function becomes potentially dangerous, as the function
may be a macro that includes a cast on the return value.

I think the fix is -Wno-unused-value. :-) It's about the least useful of the
-Wunused-<foo> warnings anyway.

I'll check this in, so please just get rid of the if(xchg()) hacky
workaround.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel