git: 6fa06708dee9 - stable/14 - 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:45 UTC
The branch stable/14 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=6fa06708dee9ed8a3a9303d3bf2c46e7f2acb72a
commit 6fa06708dee9ed8a3a9303d3bf2c46e7f2acb72a
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:03:08 +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 f00b7f679f4a..e2491a49b29d 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -97,6 +97,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\