summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2016-11-14 22:53:15 (GMT)
committerYann Collet <cyan@fb.com>2016-11-14 22:53:15 (GMT)
commit4c5c711b7a7553def6b400df9efed5e8381e8e87 (patch)
tree33db4abff62e9a6ec43bd87e7d8cc7ee3c73e74c
parentf094f531441140f10fd461ba769f49d10f5cd581 (diff)
downloadlz4-4c5c711b7a7553def6b400df9efed5e8381e8e87.zip
lz4-4c5c711b7a7553def6b400df9efed5e8381e8e87.tar.gz
lz4-4c5c711b7a7553def6b400df9efed5e8381e8e87.tar.bz2
fixed minor conversion warning
-rw-r--r--lib/lz4.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index ff141be..89e3a0f 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1127,13 +1127,12 @@ FORCE_INLINE int LZ4_decompress_generic(
/* Main Loop : decode sequences */
while (1) {
- unsigned token;
size_t length;
const BYTE* match;
size_t offset;
/* get literal length */
- token = *ip++;
+ unsigned const token = *ip++;
if ((length=(token>>ML_BITS)) == RUN_MASK) {
unsigned s;
do {
@@ -1168,7 +1167,7 @@ FORCE_INLINE int LZ4_decompress_generic(
offset = LZ4_readLE16(ip); ip+=2;
match = op - offset;
if ((checkOffset) && (unlikely(match < lowLimit))) goto _output_error; /* Error : offset outside buffers */
- LZ4_write32(op, offset); /* costs ~1%; silence an msan warning when offset==0 */
+ LZ4_write32(op, (U32)offset); /* costs ~1%; silence an msan warning when offset==0 */
/* get matchlength */
length = token & ML_MASK;