From 0ecb61619688acf57a6f5d7b00bf7fda62cf7c53 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 30 Nov 2022 11:08:16 -0700 Subject: [PATCH] clang: Define NO_WDEPRECATED_NON_PROTOTYPE for clang 15 Clang 15 enforces function definitions using the C89 form rather than the K&R form. While not strictly a prototype (which is only for a declaration), use the name that mirror's clang's warning name. Much code in contrib still uses K&R function definitions, so invent this for compiling there. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D37515 --- share/mk/bsd.sys.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index aa2336700524..02a27e0f9464 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -114,6 +114,9 @@ CWARNFLAGS+= -Wno-misleading-indentation .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 140000 NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical .endif +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000 +NO_WDEPRECATED_NON_PROTOTYPE=-Wno-deprecated-non-prototype +.endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 110100 NO_WARRAY_PARAMETER= -Wno-array-parameter .endif