git: cd800d3c9635 - main - Enable -Warray-parameter for clang.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 11 Apr 2023 20:48:18 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cd800d3c963578310e18e40846a38c77bc24fa0a commit cd800d3c963578310e18e40846a38c77bc24fa0a Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-04-11 20:47:59 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-04-11 20:47:59 +0000 Enable -Warray-parameter for clang. I fixed many of these previously for GCC 12 and make tinderbox passes with this enabled. Differential Revision: https://reviews.freebsd.org/D39378 --- share/mk/bsd.sys.mk | 2 +- sys/conf/kern.mk | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index b4c053d053dc..8446b8eeae62 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -95,7 +95,6 @@ CWARNFLAGS.clang+= -Wno-unused-const-variable 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 @@ -127,6 +126,7 @@ CWARNFLAGS+= -Wno-misleading-indentation NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical .endif .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000 +NO_WARRAY_PARAMETER= -Wno-array-parameter NO_WSTRICT_PROTOTYPES= -Wno-strict-prototypes NO_WDEPRECATED_NON_PROTOTYPE=-Wno-deprecated-non-prototype .endif diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 8676cb525db4..b7f89c78d19d 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -47,10 +47,9 @@ CWARNEXTRA?= -Wno-error=tautological-compare -Wno-error=empty-body \ CWARNEXTRA+= -Wno-error=shift-negative-value CWARNEXTRA+= -Wno-address-of-packed-member .if ${COMPILER_VERSION} >= 150000 -# Clang 15 has much more aggressive diagnostics about inconsistently declared -# array parameters, K&R prototypes, mismatched prototypes, and unused-but-set -# variables. Make these non-fatal for the time being. -CWARNEXTRA+= -Wno-error=array-parameter +# Clang 15 has much more aggressive diagnostics about K&R prototypes, +# mismatched prototypes, and unused-but-set variables. Make these +# non-fatal for the time being. CWARNEXTRA+= -Wno-error=deprecated-non-prototype CWARNEXTRA+= -Wno-error=strict-prototypes CWARNEXTRA+= -Wno-error=unused-but-set-variable