aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-05-23 19:37:18 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-05-23 19:37:18 +0300
commit2ce4f36f179a81d0c6e182a409f363df759d1ad0 (patch)
treeb9c5d7567cbbaee22843e2a6cad1f0167df75378
parentxz: Fix build with --disable-threads. (diff)
downloadxz-2ce4f36f179a81d0c6e182a409f363df759d1ad0.tar.xz
liblzma: Silence a warning.
The actual initialization is done via mythread_sync and seems that GCC doesn't necessarily see that it gets initialized there.
-rw-r--r--src/liblzma/common/stream_decoder_mt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/common/stream_decoder_mt.c b/src/liblzma/common/stream_decoder_mt.c
index e8939254..3786b2aa 100644
--- a/src/liblzma/common/stream_decoder_mt.c
+++ b/src/liblzma/common/stream_decoder_mt.c
@@ -1336,7 +1336,7 @@ stream_decode_mt(void *coder_ptr, const lzma_allocator *allocator,
// more in cache).
uint64_t mem_in_use;
uint64_t mem_cached;
- struct worker_thread *thr;
+ struct worker_thread *thr = NULL; // Init to silence warning.
mythread_sync(coder->mutex) {
mem_in_use = coder->mem_in_use;