summaryrefslogtreecommitdiff
path: root/security/nss/coreconf/Werror.mk
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/coreconf/Werror.mk')
-rw-r--r--security/nss/coreconf/Werror.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/security/nss/coreconf/Werror.mk b/security/nss/coreconf/Werror.mk
index 69155eb145..a569a497ce 100644
--- a/security/nss/coreconf/Werror.mk
+++ b/security/nss/coreconf/Werror.mk
@@ -48,9 +48,11 @@ ifndef WARNING_CFLAGS
else
# This tests to see if enabling the warning is possible before
# setting an option to disable it.
- disable_warning = $(shell $(CC) -x c -E -Werror -W$(1) /dev/null >/dev/null 2>&1 && echo -Wno-$(1))
+ set_warning = $(shell $(CC) -x c -E -Werror -W$(1) /dev/null >/dev/null 2>&1 && echo -W$(2)$(1))
+ enable_warning = $(call set_warning,$(1),)
+ disable_warning = $(call set_warning,$(1),no-)
- WARNING_CFLAGS = -Wall
+ WARNING_CFLAGS = -Wall $(call enable_warning,shadow)
ifdef CC_IS_CLANG
# -Qunused-arguments : clang objects to arguments that it doesn't understand
# and fixing this would require rearchitecture