aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/liblzma/common/stream_decoder_mt.c8
-rw-r--r--src/liblzma/common/stream_encoder_mt.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/liblzma/common/stream_decoder_mt.c b/src/liblzma/common/stream_decoder_mt.c
index fd5cd7fd..b8ba4d39 100644
--- a/src/liblzma/common/stream_decoder_mt.c
+++ b/src/liblzma/common/stream_decoder_mt.c
@@ -1358,9 +1358,11 @@ stream_decode_mt(void *coder_ptr, const lzma_allocator *allocator,
// values after we read these as those changes can only be
// towards more favorable conditions (less memory in use,
// more in cache).
- uint64_t mem_in_use;
- uint64_t mem_cached;
- struct worker_thread *thr = NULL; // Init to silence warning.
+ //
+ // These are initalized to silence warnings.
+ uint64_t mem_in_use = 0;
+ uint64_t mem_cached = 0;
+ struct worker_thread *thr = NULL;
mythread_sync(coder->mutex) {
mem_in_use = coder->mem_in_use;
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;