From 49b372b938df92fbcd12e2389f75808de1457c9d Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 13 Oct 2026 19:04:47 +0300 Subject: [PATCH] xz: Silence a Clang warning on Windows From Clang 23.1.3: src/xz/file_io.c:108:13: error: variable 'try_sparse' set but not used [-Werror,-Wunused-but-set-global] 108 | static bool try_sparse = true; | ^ --- src/xz/file_io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xz/file_io.c b/src/xz/file_io.c index 6f784dd6..808c1d42 100644 --- a/src/xz/file_io.c +++ b/src/xz/file_io.c @@ -104,10 +104,10 @@ typedef enum { } io_wait_ret; +#ifndef TUKLIB_DOSLIKE /// If true, try to create sparse files when decompressing. static bool try_sparse = true; -#ifndef TUKLIB_DOSLIKE /// File status flags of standard input. This is used by io_open_src() /// and io_close_src(). static int stdin_flags; @@ -186,7 +186,9 @@ io_write_to_user_abort_pipe(void) extern void io_no_sparse(void) { +#ifndef TUKLIB_DOSLIKE try_sparse = false; +#endif return; }