git: 3dad1c6696d2 - main - Enable -Wstrict-prototypes for all clang versions at WARNS >= 3.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 25 May 2023 14:12:15 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3dad1c6696d2b86d7c4662b509f09b91f7f1aed4 commit 3dad1c6696d2b86d7c4662b509f09b91f7f1aed4 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-05-25 14:11:38 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-05-25 14:11:38 +0000 Enable -Wstrict-prototypes for all clang versions at WARNS >= 3. Previously clang 15+ only enabled it for WARNS >= 5. PR: 271072 (exp-run) Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39732 --- share/mk/bsd.sys.mk | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 8141ed0661d1..b4a417236c65 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -50,7 +50,7 @@ CWARNFLAGS+= -Wall -Wno-format-y2k .endif # WARNS >= 2 .if ${WARNS} >= 3 CWARNFLAGS+= -W -Wno-unused-parameter -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 150000 +.if ${COMPILER_TYPE} == "clang" CWARNFLAGS+= -Wstrict-prototypes .endif CWARNFLAGS+= -Wmissing-prototypes -Wpointer-arith @@ -62,11 +62,6 @@ 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