git: 4e8b87afe008 - main - Handle errors if WARNS is not defined.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Apr 2023 17:18:11 UTC
The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=4e8b87afe0085b893b85127f4b05610518d30a67 commit 4e8b87afe0085b893b85127f4b05610518d30a67 Author: Steve Kiernan <stevek@juniper.net> AuthorDate: 2023-01-16 23:41:20 +0000 Commit: Stephen J. Kiernan <stevek@FreeBSD.org> CommitDate: 2023-04-18 17:18:01 +0000 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. --- share/mk/bsd.sys.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"