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
This commit is contained in:
Warner Losh 2022-11-30 11:08:16 -07:00
parent f4d3aa7490
commit 0ecb616196

View File

@ -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