When building a Linux kernel the new default of having
-Wunused-but-set-variable is incredibly noisy in kernel build. I get hundreds
of new warnings from that.
I looked at some of the circumstances and it's typically
int var = VALUE;
#ifdef SYMBOL
if (do something)
var = other value
#endif
with SYMBOL being undefined in this build.
I don't think it's feasible to avoid the warning short of turning it off.
I suspect other code bases will have the same problem.
Can the warning be removed from -Wall please?
--
Summary: -Wunused- but-set-variable is incredible noisy in kernel
builds
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andi-gcc at firstfloor dot org
GCC host triplet: x86_64-linux
GCC target triplet: x86_64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44478