Set -Wno-unused-but-set-variable globally
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 19 Apr 2011 17:39:31 +0000 (10:39 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 19 Apr 2011 17:44:10 +0000 (10:44 -0700)
commit12c1acde76683108441827ae9affba1872f3afe5
tree6800b49b99d7e5c868a64d8511ab9232bb3a1b73
parent79713039a2b6e0ed223d141b4a8a8455f282d2f2
Set -Wno-unused-but-set-variable globally

As of gcc-4.6 the option -Wunused-but-set-variable is enabled by
default.  While this is a useful warning there are numerous places
in the ZFS code when a variable is set and then only checked in an
ASSERT().  To avoid having to update every instance of this in the
code we now set -Wno-unused-but-set-variable to suppress the warning.

Additionally, when building with --enable-debug and -Werror set these
warning also become fatal.  We can reevaluate the suppression of these
error at a later time if it becomes an issue.  For now we are basically
just reverting to the previous gcc behavior.
20 files changed:
cmd/mount_zfs/Makefile.in
cmd/zdb/Makefile.in
cmd/zfs/Makefile.in
cmd/zinject/Makefile.in
cmd/zpios/Makefile.in
cmd/zpool/Makefile.in
cmd/ztest/Makefile.in
cmd/zvol_id/Makefile.in
config/Rules.am
config/kernel.m4
configure
lib/libavl/Makefile.in
lib/libefi/Makefile.in
lib/libnvpair/Makefile.in
lib/libspl/Makefile.in
lib/libspl/asm-generic/Makefile.in
lib/libunicode/Makefile.in
lib/libuutil/Makefile.in
lib/libzfs/Makefile.in
lib/libzpool/Makefile.in