aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kiernan <stevek@juniper.net>2023-01-16 23:41:20 +0000
committerStephen J. Kiernan <stevek@FreeBSD.org>2023-04-18 17:18:01 +0000
commit4e8b87afe0085b893b85127f4b05610518d30a67 (patch)
tree9372d4d8b33c6c5c6cda8711d79c6fae28a0891e
parenta12d60b99ee5a453e249adc8cf239117f50bd603 (diff)
downloadsrc-4e8b87afe0085b893b85127f4b05610518d30a67.tar.gz
src-4e8b87afe0085b893b85127f4b05610518d30a67.zip
Handle errors if WARNS is not defined.
One conditional outside of ifdef WARNS did not protect against an unset WARNS. Default WARNS to 0 in conditional if not defined. Obtained from: Juniper Networks, Inc.
-rw-r--r--share/mk/bsd.sys.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 8446b8eeae62..9d24c87d9eea 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -149,7 +149,7 @@ WFORMAT= 1
.if ${WFORMAT} > 0
#CWARNFLAGS+= -Wformat-nonliteral -Wformat-security -Wno-format-extra-args
CWARNFLAGS+= -Wformat=2 -Wno-format-extra-args
-.if ${WARNS} <= 3
+.if ${WARNS:U0} <= 3
CWARNFLAGS.clang+= -Wno-format-nonliteral
.endif # WARNS <= 3
.if ${MK_WERROR} != "no" && ${MK_WERROR.${COMPILER_TYPE}:Uyes} != "no"