Commit 5a0dbb19 for xz
commit 5a0dbb19c6d0d1913233f7d3ecce96e8f0168584
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: Wed Oct 28 10:11:50 2026 +0200
xz: Silence a warning from Clang 23 when threading is disabled
src/xz/hardware.c:29:13: warning: variable 'use_mt_mode_with_one_thread' set but not used [-Wunused-but-set-global]
29 | static bool use_mt_mode_with_one_thread = false;
| ^
diff --git a/src/xz/hardware.c b/src/xz/hardware.c
index 3a1a709f..9a6a1aa0 100644
--- a/src/xz/hardware.c
+++ b/src/xz/hardware.c
@@ -15,6 +15,10 @@
# include <sys/resource.h>
#endif
+#if !defined(MYTHREAD_ENABLED) && defined(__clang__) && __clang_major__ >= 23
+# pragma GCC diagnostic ignored "-Wunused-but-set-global"
+#endif
+
/// Maximum number of worker threads. This can be set with
/// the --threads=NUM command line option.