git: a4c23ad43007 - releng/14.2 - bsd.sys.mk: for clang >= 19, similar to gcc >= 8.1, turn off -Werror for -Wcast-function-type-mismatch.

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 06 Nov 2024 21:52:23 UTC
The branch releng/14.2 has been updated by dim:

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

commit a4c23ad430077234207d13e7f6341aad442a67ce
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-07-30 18:28:51 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-06 21:51:39 +0000

    bsd.sys.mk: for clang >= 19, similar to gcc >= 8.1, turn off -Werror for
    -Wcast-function-type-mismatch.
    
    PR:             280562
    Approved by:    re (kib)
    MFC after:      1 month
    
    (cherry picked from commit d575077527d448ee45b923fa8c6b0cb7216ca5c5)
    (cherry picked from commit de45d36ffb604798c22f7ee556d774490902c1e1)
---
 share/mk/bsd.sys.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index a1be8a8a2225..061c6b36f84d 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -88,6 +88,10 @@ CWARNFLAGS.clang+=	-Wno-unused-const-variable
 .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000
 CWARNFLAGS.clang+=	-Wno-error=unused-but-set-parameter
 .endif
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 190000
+# Similar to gcc >= 8.1 -Wno-error=cast-function-type below
+CWARNFLAGS.clang+=	-Wno-error=cast-function-type-mismatch
+.endif
 .endif # WARNS <= 6
 .if ${WARNS} <= 3
 CWARNFLAGS.clang+=	-Wno-tautological-compare -Wno-unused-value\