diff options
author | Brian Behlendorf <[email protected]> | 2011-04-19 10:39:31 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-04-19 10:44:10 -0700 |
commit | 12c1acde76683108441827ae9affba1872f3afe5 (patch) | |
tree | 6800b49b99d7e5c868a64d8511ab9232bb3a1b73 /cmd | |
parent | 79713039a2b6e0ed223d141b4a8a8455f282d2f2 (diff) |
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.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mount_zfs/Makefile.in | 7 | ||||
-rw-r--r-- | cmd/zdb/Makefile.in | 7 | ||||
-rw-r--r-- | cmd/zfs/Makefile.in | 7 | ||||
-rw-r--r-- | cmd/zinject/Makefile.in | 7 | ||||
-rw-r--r-- | cmd/zpios/Makefile.in | 7 | ||||
-rw-r--r-- | cmd/zpool/Makefile.in | 7 | ||||
-rw-r--r-- | cmd/ztest/Makefile.in | 9 | ||||
-rw-r--r-- | cmd/zvol_id/Makefile.in | 7 |
8 files changed, 33 insertions, 25 deletions
diff --git a/cmd/mount_zfs/Makefile.in b/cmd/mount_zfs/Makefile.in index eb30f84aa..27afbebdd 100644 --- a/cmd/mount_zfs/Makefile.in +++ b/cmd/mount_zfs/Makefile.in @@ -304,9 +304,10 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \ -I$(top_srcdir)/include -I$(top_srcdir)/lib/libspl/include AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ - ${DEBUG_CFLAGS} -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT \ - -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" + -Wno-unused-but-set-variable ${DEBUG_CFLAGS} -D_GNU_SOURCE \ + -D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + -DTEXT_DOMAIN=\"zfs-linux-user\" mount_zfs_SOURCES = \ $(top_srcdir)/cmd/mount_zfs/mount_zfs.c diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in index 092b6b08f..bce8a786e 100644 --- a/cmd/zdb/Makefile.in +++ b/cmd/zdb/Makefile.in @@ -300,9 +300,10 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \ -I$(top_srcdir)/include -I$(top_srcdir)/lib/libspl/include AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ - ${DEBUG_CFLAGS} -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT \ - -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" + -Wno-unused-but-set-variable ${DEBUG_CFLAGS} -D_GNU_SOURCE \ + -D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + -DTEXT_DOMAIN=\"zfs-linux-user\" zdb_SOURCES = \ $(top_srcdir)/cmd/zdb/zdb.c \ $(top_srcdir)/cmd/zdb/zdb_il.c diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index f9e3c84b6..8df35a2c9 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -300,9 +300,10 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \ -I$(top_srcdir)/include -I$(top_srcdir)/lib/libspl/include AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ - ${DEBUG_CFLAGS} -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT \ - -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" + -Wno-unused-but-set-variable ${DEBUG_CFLAGS} -D_GNU_SOURCE \ + -D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + -DTEXT_DOMAIN=\"zfs-linux-user\" zfs_SOURCES = \ $(top_srcdir)/cmd/zfs/zfs_iter.c \ $(top_srcdir)/cmd/zfs/zfs_iter.h \ diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in index 7f3c041da..47ee6d74a 100644 --- a/cmd/zinject/Makefile.in +++ b/cmd/zinject/Makefile.in @@ -300,9 +300,10 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \ -I$(top_srcdir)/include -I$(top_srcdir)/lib/libspl/include AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ - ${DEBUG_CFLAGS} -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT \ - -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" + -Wno-unused-but-set-variable ${DEBUG_CFLAGS} -D_GNU_SOURCE \ + -D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + -DTEXT_DOMAIN=\"zfs-linux-user\" zinject_SOURCES = \ $(top_srcdir)/cmd/zinject/translate.c \ $(top_srcdir)/cmd/zinject/zinject.c \ diff --git a/cmd/zpios/Makefile.in b/cmd/zpios/Makefile.in index 70b84e238..9f42e2d6f 100644 --- a/cmd/zpios/Makefile.in +++ b/cmd/zpios/Makefile.in @@ -290,9 +290,10 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \ -I$(top_srcdir)/include AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ - ${DEBUG_CFLAGS} -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT \ - -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" + -Wno-unused-but-set-variable ${DEBUG_CFLAGS} -D_GNU_SOURCE \ + -D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + -DTEXT_DOMAIN=\"zfs-linux-user\" zpios_SOURCES = \ $(top_srcdir)/cmd/zpios/zpios_main.c \ $(top_srcdir)/cmd/zpios/zpios_util.c \ diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in index 39b1d3bb4..f3e4bc73e 100644 --- a/cmd/zpool/Makefile.in +++ b/cmd/zpool/Makefile.in @@ -301,9 +301,10 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \ -I$(top_srcdir)/include -I$(top_srcdir)/lib/libspl/include AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ - ${DEBUG_CFLAGS} -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT \ - -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" + -Wno-unused-but-set-variable ${DEBUG_CFLAGS} -D_GNU_SOURCE \ + -D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + -DTEXT_DOMAIN=\"zfs-linux-user\" zpool_SOURCES = \ $(top_srcdir)/cmd/zpool/zpool_iter.c \ $(top_srcdir)/cmd/zpool/zpool_main.c \ diff --git a/cmd/ztest/Makefile.in b/cmd/ztest/Makefile.in index c929bf0cc..65e36a0c9 100644 --- a/cmd/ztest/Makefile.in +++ b/cmd/ztest/Makefile.in @@ -300,10 +300,11 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \ -I$(top_srcdir)/include -I$(top_srcdir)/lib/libspl/include AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ - ${DEBUG_CFLAGS} -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT \ - -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" \ - $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) + -Wno-unused-but-set-variable ${DEBUG_CFLAGS} -D_GNU_SOURCE \ + -D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + -DTEXT_DOMAIN=\"zfs-linux-user\" $(DEBUG_STACKFLAGS) \ + $(FRAME_LARGER_THAN) ztest_SOURCES = \ $(top_srcdir)/cmd/ztest/ztest.c diff --git a/cmd/zvol_id/Makefile.in b/cmd/zvol_id/Makefile.in index 7698158b0..3e8a34be0 100644 --- a/cmd/zvol_id/Makefile.in +++ b/cmd/zvol_id/Makefile.in @@ -290,9 +290,10 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \ -I$(top_srcdir)/include -I$(top_srcdir)/lib/libspl/include AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ - ${DEBUG_CFLAGS} -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT \ - -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 \ - -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" + -Wno-unused-but-set-variable ${DEBUG_CFLAGS} -D_GNU_SOURCE \ + -D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + -DTEXT_DOMAIN=\"zfs-linux-user\" zvol_id_SOURCES = \ $(top_srcdir)/cmd/zvol_id/zvol_id_main.c |