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

Re: [Xen-devel] Re: [PATCH 01/04] Kexec / Kdump: Generic code



On Tue, Oct 17, 2006 at 03:49:12PM +0100, Keir Fraser wrote:
> 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.

I have to say that I entirely disagree with your solution.
I think the solution is to get rid of -Werror. But I will
remove the if(xchg()) foo as you request.

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


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


 


Rackspace

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