diff options
author | Yann Collet <cyan@fb.com> | 2018-09-18 22:51:26 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2018-09-18 22:51:26 (GMT) |
commit | 8bea19d57c0db6d3d812c7acc3d1834762bce297 (patch) | |
tree | 68f6a3fb2e10f0eb0ecf80ecfc5182184a1a8f83 /lib/lz4hc.c | |
parent | c3397520a1955d418be2421e33d1b618ea049cb7 (diff) | |
download | lz4-8bea19d57c0db6d3d812c7acc3d1834762bce297.zip lz4-8bea19d57c0db6d3d812c7acc3d1834762bce297.tar.gz lz4-8bea19d57c0db6d3d812c7acc3d1834762bce297.tar.bz2 |
fixed minor cppcheck warnings in lib
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r-- | lib/lz4hc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c index 87f4cdb..714ab62 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -231,7 +231,6 @@ LZ4HC_InsertAndGetWiderMatch ( int matchChainPos = 0; U32 const pattern = LZ4_read32(ip); U32 matchIndex; - U32 dictMatchIndex; repeat_state_e repeat = rep_untested; size_t srcPatternLength = 0; @@ -349,8 +348,8 @@ LZ4HC_InsertAndGetWiderMatch ( if (dict == usingDictCtx && nbAttempts && ipIndex - lowestMatchIndex < MAX_DISTANCE) { size_t const dictEndOffset = dictCtx->end - dictCtx->base; + U32 dictMatchIndex = dictCtx->hashTable[LZ4HC_hashPtr(ip)]; assert(dictEndOffset <= 1 GB); - dictMatchIndex = dictCtx->hashTable[LZ4HC_hashPtr(ip)]; matchIndex = dictMatchIndex + lowestMatchIndex - (U32)dictEndOffset; while (ipIndex - matchIndex <= MAX_DISTANCE && nbAttempts--) { const BYTE* const matchPtr = dictCtx->base + dictMatchIndex; |