summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2019-04-14 16:03:30 -0700
committerJohn Levon <john.levon@joyent.com>2019-04-24 08:32:04 -0700
commit32e09e17e4529edf39ffb44fb13cdb6a0fb45733 (patch)
tree352c0795833535cdd708fc680926a3b174b07f83 /usr/src
parent8e718be9d8b2bb15811a2dc0b61cbb5cc5fa3070 (diff)
downloadillumos-joyent-32e09e17e4529edf39ffb44fb13cdb6a0fb45733.tar.gz
10804 Enable unused warnings outside of uts
Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/Makefile.master4
-rw-r--r--usr/src/cmd/cmd-inet/usr.sbin/Makefile3
-rw-r--r--usr/src/cmd/fm/fmd/Makefile.fmd5
-rw-r--r--usr/src/cmd/mdb/intel/Makefile.kmdb4
-rw-r--r--usr/src/cmd/sgs/libld/Makefile.com1
-rw-r--r--usr/src/lib/libc/amd64/Makefile2
-rw-r--r--usr/src/lib/libc/i386/Makefile.com2
-rw-r--r--usr/src/lib/udapl/udapl_tavor/Makefile.com7
8 files changed, 17 insertions, 11 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 5321004bff..a2575e7a88 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -456,10 +456,6 @@ CERRWARN += -_gcc=-Wno-missing-field-initializers
# Unfortunately, this option can misfire very easily and unfixably.
CERRWARN += -_gcc=-Wno-array-bounds
-# DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in
-# -nd builds
-$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
-$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-empty-body
CERRWARN += -_smatch=-p=illumos_user
include $(SRC)/Makefile.smatch
diff --git a/usr/src/cmd/cmd-inet/usr.sbin/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/Makefile
index 3325b08925..f17a96a1ed 100644
--- a/usr/src/cmd/cmd-inet/usr.sbin/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.sbin/Makefile
@@ -22,7 +22,7 @@
#
# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
-# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2019, Joyent, Inc.
#
SYNCPROG= syncinit syncloop syncstat
@@ -164,6 +164,7 @@ if_mpadm := LDLIBS += -linetutil -lipmp
if_mpadm.po := XGETFLAGS += -a
route := CPPFLAGS += -DNDEBUG
ndd := LDLIBS += -ldladm -lipadm
+$(RELEASE_BUILD)ndd := CERRWARN += -_gcc=-Wno-unused
in.comsat := LDFLAGS += $(MAPFILE.NGB:%=-M%)
.KEEP_STATE:
diff --git a/usr/src/cmd/fm/fmd/Makefile.fmd b/usr/src/cmd/fm/fmd/Makefile.fmd
index 1a23743d95..7ad59e737a 100644
--- a/usr/src/cmd/fm/fmd/Makefile.fmd
+++ b/usr/src/cmd/fm/fmd/Makefile.fmd
@@ -21,7 +21,7 @@
#
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2015 RackTop Systems.
-# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2019, Joyent, Inc.
#
.KEEP_STATE:
@@ -121,8 +121,9 @@ LINTFLAGS += -mu
CERRWARN += -_gcc=-Wno-switch
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-uninitialized
-CERRWARN += -_gcc=-Wno-unused-variable
CERRWARN += -_gcc=-Wno-clobbered
+$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused-but-set-variable
+CERRWARN += -_gcc=-Wno-unused-variable
# not linted
SMATCH=off
diff --git a/usr/src/cmd/mdb/intel/Makefile.kmdb b/usr/src/cmd/mdb/intel/Makefile.kmdb
index 0a2a5e8581..1e9efcbc83 100644
--- a/usr/src/cmd/mdb/intel/Makefile.kmdb
+++ b/usr/src/cmd/mdb/intel/Makefile.kmdb
@@ -22,7 +22,7 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Copyright 2018 Joyent, Inc.
+# Copyright 2019, Joyent, Inc.
#
PROMSRCS += \
@@ -56,6 +56,8 @@ $(CTXOFFUSERS) $(CTXOFFUSERS:%.o=%.ln): kmdb_context_off.h
kaif_activate.o kaif_activate.ln := CPPFLAGS += -D_MACHDEP -D_KMEMUSER
+$(RELEASE_BUILD)kaif.o := CERRWARN += -_gcc=-Wno-unused
+
STANDLIBS += \
../libstandctf/libstandctf.so \
$(SRC)/lib/libumem/$(MACHDIR)/libstandumem.so \
diff --git a/usr/src/cmd/sgs/libld/Makefile.com b/usr/src/cmd/sgs/libld/Makefile.com
index 44f372d088..2119ecec29 100644
--- a/usr/src/cmd/sgs/libld/Makefile.com
+++ b/usr/src/cmd/sgs/libld/Makefile.com
@@ -92,6 +92,7 @@ CERRWARN += -_gcc=-Wno-uninitialized
CERRWARN += -_gcc=-Wno-switch
CERRWARN += -_gcc=-Wno-char-subscripts
CERRWARN += -_gcc=-Wno-type-limits
+$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
SMOFF += no_if_block
diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile
index 29e76ac16e..b981d952c3 100644
--- a/usr/src/lib/libc/amd64/Makefile
+++ b/usr/src/lib/libc/amd64/Makefile
@@ -1037,6 +1037,8 @@ CERRWARN += -_gcc=-Wno-clobbered
CERRWARN += -_gcc=-Wno-unused-function
CERRWARN += -_gcc=-Wno-address
+$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
+
# not linted
SMATCH=off
diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com
index 4b5386328a..9ae85be490 100644
--- a/usr/src/lib/libc/i386/Makefile.com
+++ b/usr/src/lib/libc/i386/Makefile.com
@@ -1085,6 +1085,8 @@ CERRWARN += -_gcc=-Wno-clobbered
CERRWARN += -_gcc=-Wno-unused-function
CERRWARN += -_gcc=-Wno-address
+$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
+
# not linted
SMATCH=off
diff --git a/usr/src/lib/udapl/udapl_tavor/Makefile.com b/usr/src/lib/udapl/udapl_tavor/Makefile.com
index a2b1711a4c..60ff446a17 100644
--- a/usr/src/lib/udapl/udapl_tavor/Makefile.com
+++ b/usr/src/lib/udapl/udapl_tavor/Makefile.com
@@ -22,7 +22,7 @@
#
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
-# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2019, Joyent, Inc.
LIBRARY= udapl_tavor.a
VERS= .1
@@ -153,11 +153,12 @@ CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-uninitialized
CERRWARN += -_gcc=-Wno-switch
+$(NOT_RELEASE_BUILD)CPPFLAGS += -DDAPL_DBG
+$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
+
# not linted
SMATCH=off
-$(NOT_RELEASE_BUILD)CPPFLAGS += -DDAPL_DBG
-
.KEEP_STATE:
all: $(LIBS)