1
0
mirror of https://git.tukaani.org/xz.git synced 2026-10-31 03:14:56 +00:00

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;
      |             ^
This commit is contained in:
Lasse Collin 2026-10-13 19:04:47 +03:00
parent b355a31140
commit 49b372b938
No known key found for this signature in database
GPG Key ID: 38EE757D69184620

View File

@ -104,10 +104,10 @@ typedef enum {
} io_wait_ret; } io_wait_ret;
#ifndef TUKLIB_DOSLIKE
/// If true, try to create sparse files when decompressing. /// If true, try to create sparse files when decompressing.
static bool try_sparse = true; static bool try_sparse = true;
#ifndef TUKLIB_DOSLIKE
/// File status flags of standard input. This is used by io_open_src() /// File status flags of standard input. This is used by io_open_src()
/// and io_close_src(). /// and io_close_src().
static int stdin_flags; static int stdin_flags;
@ -186,7 +186,9 @@ io_write_to_user_abort_pipe(void)
extern void extern void
io_no_sparse(void) io_no_sparse(void)
{ {
#ifndef TUKLIB_DOSLIKE
try_sparse = false; try_sparse = false;
#endif
return; return;
} }