summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-04-19 10:39:31 -0700
committerBrian Behlendorf <[email protected]>2011-04-19 10:44:10 -0700
commit12c1acde76683108441827ae9affba1872f3afe5 (patch)
tree6800b49b99d7e5c868a64d8511ab9232bb3a1b73 /lib
parent79713039a2b6e0ed223d141b4a8a8455f282d2f2 (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 'lib')
-rw-r--r--lib/libavl/Makefile.in9
-rw-r--r--lib/libefi/Makefile.in9
-rw-r--r--lib/libnvpair/Makefile.in9
-rw-r--r--lib/libspl/Makefile.in9
-rw-r--r--lib/libspl/asm-generic/Makefile.in7
-rw-r--r--lib/libunicode/Makefile.in9
-rw-r--r--lib/libuutil/Makefile.in9
-rw-r--r--lib/libzfs/Makefile.in7
-rw-r--r--lib/libzpool/Makefile.in9
9 files changed, 43 insertions, 34 deletions
diff --git a/lib/libavl/Makefile.in b/lib/libavl/Makefile.in
index 29441be7e..863d72e30 100644
--- a/lib/libavl/Makefile.in
+++ b/lib/libavl/Makefile.in
@@ -310,10 +310,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)
lib_LTLIBRARIES = libavl.la
libavl_la_SOURCES = \
$(top_srcdir)/module/avl/avl.c
diff --git a/lib/libefi/Makefile.in b/lib/libefi/Makefile.in
index 9f918294c..77f99b6b5 100644
--- a/lib/libefi/Makefile.in
+++ b/lib/libefi/Makefile.in
@@ -310,10 +310,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)
lib_LTLIBRARIES = libefi.la
libefi_la_SOURCES = \
$(top_srcdir)/lib/libefi/rdwr_efi.c
diff --git a/lib/libnvpair/Makefile.in b/lib/libnvpair/Makefile.in
index 0848c9427..31a6ccba7 100644
--- a/lib/libnvpair/Makefile.in
+++ b/lib/libnvpair/Makefile.in
@@ -311,10 +311,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)
lib_LTLIBRARIES = libnvpair.la
libnvpair_la_SOURCES = \
$(top_srcdir)/lib/libnvpair/libnvpair.c \
diff --git a/lib/libspl/Makefile.in b/lib/libspl/Makefile.in
index 7e1bc6d5a..e9f98817a 100644
--- a/lib/libspl/Makefile.in
+++ b/lib/libspl/Makefile.in
@@ -361,10 +361,11 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \
-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)
SUBDIRS = include $(TARGET_ASM_DIR)
DIST_SUBDIRS = include asm-generic asm-i386 asm-x86_64
AM_CCASFLAGS = \
diff --git a/lib/libspl/asm-generic/Makefile.in b/lib/libspl/asm-generic/Makefile.in
index b49f38c4f..22f975042 100644
--- a/lib/libspl/asm-generic/Makefile.in
+++ b/lib/libspl/asm-generic/Makefile.in
@@ -259,9 +259,10 @@ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \
-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\"
atomic_SOURCE = atomic.c
atomic_ASM = atomic.S
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
diff --git a/lib/libunicode/Makefile.in b/lib/libunicode/Makefile.in
index 617f30817..6098ce959 100644
--- a/lib/libunicode/Makefile.in
+++ b/lib/libunicode/Makefile.in
@@ -310,10 +310,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)
lib_LTLIBRARIES = libunicode.la
libunicode_la_SOURCES = \
$(top_srcdir)/module/unicode/u8_textprep.c \
diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in
index 168724d80..c20081946 100644
--- a/lib/libuutil/Makefile.in
+++ b/lib/libuutil/Makefile.in
@@ -312,10 +312,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)
lib_LTLIBRARIES = libuutil.la
libuutil_la_LIBADD = $(top_builddir)/lib/libavl/libavl.la
libuutil_la_SOURCES = \
diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in
index 2880412ab..bcd310151 100644
--- a/lib/libzfs/Makefile.in
+++ b/lib/libzfs/Makefile.in
@@ -320,9 +320,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\"
lib_LTLIBRARIES = libzfs.la
libzfs_la_LDFLAGS = -lm -ldl $(LIBSELINUX)
libzfs_la_LIBADD = \
diff --git a/lib/libzpool/Makefile.in b/lib/libzpool/Makefile.in
index 39feb9d27..56b449365 100644
--- a/lib/libzpool/Makefile.in
+++ b/lib/libzpool/Makefile.in
@@ -331,10 +331,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)
lib_LTLIBRARIES = libzpool.la
libzpool_la_LIBADD = \
$(top_builddir)/lib/libunicode/libunicode.la \