aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lzma/lzma2_decoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2019-06-23 21:38:56 +0300
committerLasse Collin <lasse.collin@tukaani.org>2019-06-23 21:38:56 +0300
commitdfac2c9a1d7d4a2b8a5d7c9c6d567dee48318bcf (patch)
treea7f2f8d656bb83f7c6d31e292505d90ba1c980d1 /src/liblzma/lzma/lzma2_decoder.c
parenttuklib_integer: Silence warnings from -Wsign-conversion. (diff)
downloadxz-dfac2c9a1d7d4a2b8a5d7c9c6d567dee48318bcf.tar.xz
liblzma: Fix warnings from -Wsign-conversion.
Also, more parentheses were added to the literal_subcoder macro in lzma_comon.h (better style but no functional change in the current usage).
Diffstat (limited to '')
-rw-r--r--src/liblzma/lzma/lzma2_decoder.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/liblzma/lzma/lzma2_decoder.c b/src/liblzma/lzma/lzma2_decoder.c
index 878c870a..cf1b5110 100644
--- a/src/liblzma/lzma/lzma2_decoder.c
+++ b/src/liblzma/lzma/lzma2_decoder.c
@@ -136,7 +136,7 @@ lzma2_decode(void *coder_ptr, lzma_dict *restrict dict,
break;
case SEQ_UNCOMPRESSED_2:
- coder->uncompressed_size += in[(*in_pos)++] + 1;
+ coder->uncompressed_size += in[(*in_pos)++] + 1U;
coder->sequence = SEQ_COMPRESSED_0;
coder->lzma.set_uncompressed(coder->lzma.coder,
coder->uncompressed_size);
@@ -148,7 +148,7 @@ lzma2_decode(void *coder_ptr, lzma_dict *restrict dict,
break;
case SEQ_COMPRESSED_1:
- coder->compressed_size += in[(*in_pos)++] + 1;
+ coder->compressed_size += in[(*in_pos)++] + 1U;
coder->sequence = coder->next_sequence;
break;
@@ -297,8 +297,8 @@ lzma_lzma2_props_decode(void **options, const lzma_allocator *allocator,
if (props[0] == 40) {
opt->dict_size = UINT32_MAX;
} else {
- opt->dict_size = 2 | (props[0] & 1);
- opt->dict_size <<= props[0] / 2 + 11;
+ opt->dict_size = 2 | (props[0] & 1U);
+ opt->dict_size <<= props[0] / 2U + 11;
}
opt->preset_dict = NULL;