This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Fix "set but not used" warnings from MIPS bits/atomic.h
- From: Matt Turner <mattst88 at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-ports at sourceware dot org
- Date: Sat, 17 Nov 2012 12:44:20 -0800
- Subject: Re: Fix "set but not used" warnings from MIPS bits/atomic.h
- References: <Pine.LNX.4.64.1211170335440.13201@digraph.polyomino.org.uk>
On Fri, Nov 16, 2012 at 7:36 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> MIPS glibc builds are very noisy with "set but not used" warnings
> (among others). Many of those warnings come from the bits/atomic.h
> macros, which are structured so that an outer macro needs to provide
> a variable __prev for use by an inner macro, but only in some cases is
> the value the asm stores in that variable used. I've applied this
> patch to use __attribute__ ((unused)) in those macros that don't use
> the value stored in __prev (so changing the numbers of warnings in
> MIPS glibc builds from tens of thousands to hundreds).
Thank you. This has annoyed me for a long time.