From 5a0dbb19c6d0d1913233f7d3ecce96e8f0168584 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Wed, 28 Oct 2026 10:11:50 +0200 Subject: [PATCH] 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; | ^ --- src/xz/hardware.c | 4 ++++ 1 file changed, 4 insertions(+) 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 #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.