git: 4cff1ab17352 - stable/15 - bsd.sys.mk: make clang 23 -Wunused-but-set-global non-fatal
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 20 Sep 2026 07:03:32 UTC
The branch stable/15 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=4cff1ab17352d7cd28f72ca8fa2f1ba08d3a604e
commit 4cff1ab17352d7cd28f72ca8fa2f1ba08d3a604e
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-09-17 19:35:22 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-09-20 07:02:47 +0000
bsd.sys.mk: make clang 23 -Wunused-but-set-global non-fatal
This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.
MFC after: 3 days
(cherry picked from commit d577b4ed588c0f259d7298188233b17dc0435dd4)
---
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 ed04825f575f..e53370a0a337 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -98,6 +98,9 @@ CXXWARNFLAGS.clang+= -Wno-c++20-extensions
CXXWARNFLAGS.clang+= -Wno-c++23-lambda-attributes
CXXWARNFLAGS.clang+= -Wno-nullability-completeness
.endif
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 230000
+CWARNFLAGS.clang+= -Wno-error=unused-but-set-global
+.endif
.endif # WARNS <= 6
.if ${WARNS} <= 3
CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-unused-value\