diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-25 10:29:58 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-04-09 15:37:03 +0000 |
commit | 29d88c3b0bfcd4974f7e84618bfb492ce88fffb1 (patch) | |
tree | 0d787d2fb515e812f16101033ee3957d04e55b6e | |
parent | 482a0e57303cc392fdcdeb53d4ef6adbaaba74c2 (diff) | |
download | src-29d88c3b0bfcd4974f7e84618bfb492ce88fffb1.tar.gz src-29d88c3b0bfcd4974f7e84618bfb492ce88fffb1.zip |
Update CWARNFLAGS in bsd.sys.mk and CWARNEXTRA in kern.mk for clang 15.
MFC after: 3 days
(cherry picked from commit 526f57bf85a2b9b113c55ded47b932abc8567bc5)
-rw-r--r-- | share/mk/bsd.sys.mk | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index b11ba2ddabcb..cb4399610d0e 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -49,8 +49,11 @@ CWARNFLAGS+= -Werror CWARNFLAGS+= -Wall -Wno-format-y2k .endif # WARNS >= 2 .if ${WARNS} >= 3 -CWARNFLAGS+= -W -Wno-unused-parameter -Wstrict-prototypes\ - -Wmissing-prototypes -Wpointer-arith +CWARNFLAGS+= -W -Wno-unused-parameter +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 150000 +CWARNFLAGS+= -Wstrict-prototypes +.endif +CWARNFLAGS+= -Wmissing-prototypes -Wpointer-arith .endif # WARNS >= 3 .if ${WARNS} >= 4 CWARNFLAGS+= -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow\ @@ -59,6 +62,11 @@ CWARNFLAGS+= -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow\ CWARNFLAGS+= -Wcast-align .endif # !NO_WCAST_ALIGN !NO_WCAST_ALIGN.${COMPILER_TYPE} .endif # WARNS >= 4 +.if ${WARNS} >= 5 +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000 +CWARNFLAGS+= -Wstrict-prototypes +.endif +.endif # WARNS >= 4 .if ${WARNS} >= 6 CWARNFLAGS+= -Wchar-subscripts -Wnested-externs \ -Wold-style-definition @@ -83,6 +91,11 @@ CWARNFLAGS.clang+= -Wno-unused-const-variable .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 CWARNFLAGS.clang+= -Wno-error=unused-but-set-variable .endif +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000 +CWARNFLAGS.clang+= -Wno-error=array-parameter +CWARNFLAGS.clang+= -Wno-error=deprecated-non-prototype +CWARNFLAGS.clang+= -Wno-error=unused-but-set-parameter +.endif .endif # WARNS <= 6 .if ${WARNS} <= 3 CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-unused-value\ |