git: 0ecb61619688 - main - clang: Define NO_WDEPRECATED_NON_PROTOTYPE for clang 15

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 30 Nov 2022 18:09:13 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=0ecb61619688acf57a6f5d7b00bf7fda62cf7c53

commit 0ecb61619688acf57a6f5d7b00bf7fda62cf7c53
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-11-30 18:08:16 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-11-30 18:08:44 +0000

    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