aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lzma/lzma_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblzma/lzma/lzma_decoder.c')
-rw-r--r--src/liblzma/lzma/lzma_decoder.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/liblzma/lzma/lzma_decoder.c b/src/liblzma/lzma/lzma_decoder.c
index d0f29b76..9af500f0 100644
--- a/src/liblzma/lzma/lzma_decoder.c
+++ b/src/liblzma/lzma/lzma_decoder.c
@@ -398,7 +398,7 @@ lzma_decode(void *coder_ptr, lzma_dict *restrict dictptr,
// ("match byte") to "len" to minimize the
// number of variables we need to store
// between decoder calls.
- len = dict_get(&dict, rep0) << 1;
+ len = (uint32_t)(dict_get(&dict, rep0)) << 1;
// The usage of "offset" allows omitting some
// branches, which should give tiny speed
@@ -569,7 +569,7 @@ lzma_decode(void *coder_ptr, lzma_dict *restrict dictptr,
#ifdef HAVE_SMALL
do {
rc_bit(probs[symbol], ,
- rep0 += 1 << offset,
+ rep0 += 1U << offset,
SEQ_DIST_MODEL);
} while (++offset < limit);
#else
@@ -577,25 +577,25 @@ lzma_decode(void *coder_ptr, lzma_dict *restrict dictptr,
case 5:
assert(offset == 0);
rc_bit(probs[symbol], ,
- rep0 += 1,
+ rep0 += 1U,
SEQ_DIST_MODEL);
++offset;
--limit;
case 4:
rc_bit(probs[symbol], ,
- rep0 += 1 << offset,
+ rep0 += 1U << offset,
SEQ_DIST_MODEL);
++offset;
--limit;
case 3:
rc_bit(probs[symbol], ,
- rep0 += 1 << offset,
+ rep0 += 1U << offset,
SEQ_DIST_MODEL);
++offset;
--limit;
case 2:
rc_bit(probs[symbol], ,
- rep0 += 1 << offset,
+ rep0 += 1U << offset,
SEQ_DIST_MODEL);
++offset;
--limit;
@@ -607,7 +607,7 @@ lzma_decode(void *coder_ptr, lzma_dict *restrict dictptr,
// the unneeded updating of
// "symbol".
rc_bit_last(probs[symbol], ,
- rep0 += 1 << offset,
+ rep0 += 1U << offset,
SEQ_DIST_MODEL);
}
#endif
@@ -635,7 +635,7 @@ lzma_decode(void *coder_ptr, lzma_dict *restrict dictptr,
do {
rc_bit(coder->pos_align[
symbol], ,
- rep0 += 1 << offset,
+ rep0 += 1U << offset,
SEQ_ALIGN);
} while (++offset < ALIGN_BITS);
#else