aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/stream_encoder_mt.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-01-12 03:19:59 +0200
committerLasse Collin <lasse.collin@tukaani.org>2023-01-12 03:19:59 +0200
commit3f13bf6b9e8624cbe6d6e3e82d6c98a3ed1ad571 (patch)
tree0eaf257d9dd2f339314eae27810d97cbe75100ad /src/liblzma/common/stream_encoder_mt.c
parentFix warnings from clang -Wdocumentation. (diff)
downloadxz-3f13bf6b9e8624cbe6d6e3e82d6c98a3ed1ad571.tar.xz
liblzma: Silence warnings from clang -Wconditional-uninitialized.
This is similar to 2ce4f36f179a81d0c6e182a409f363df759d1ad0. The actual initialization of the variables is done inside mythread_sync() macro. Clang doesn't seem to see that the initialization code inside the macro is always executed.
Diffstat (limited to 'src/liblzma/common/stream_encoder_mt.c')
-rw-r--r--src/liblzma/common/stream_encoder_mt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/common/stream_encoder_mt.c b/src/liblzma/common/stream_encoder_mt.c
index f4497c10..5990742b 100644
--- a/src/liblzma/common/stream_encoder_mt.c
+++ b/src/liblzma/common/stream_encoder_mt.c
@@ -645,7 +645,7 @@ stream_encode_in(lzma_stream_coder *coder, const lzma_allocator *allocator,
}
if (block_error) {
- lzma_ret ret;
+ lzma_ret ret = LZMA_OK; // Init to silence a warning.
mythread_sync(coder->mutex) {
ret = coder->thread_error;