diff options
author | test4973 <Kdo4973@hotmail.com> | 2018-04-10 00:08:17 (GMT) |
---|---|---|
committer | test4973 <Kdo4973@hotmail.com> | 2018-04-10 00:08:17 (GMT) |
commit | cf2f06a6c5046ef7d576bc8ad210c3f2efe1f401 (patch) | |
tree | 2d9a564962704eb18beea052386c3c255c7fddac /lib | |
parent | b28abb9f1864341575b028e990798693ca817da7 (diff) | |
download | lz4-cf2f06a6c5046ef7d576bc8ad210c3f2efe1f401.zip lz4-cf2f06a6c5046ef7d576bc8ad210c3f2efe1f401.tar.gz lz4-cf2f06a6c5046ef7d576bc8ad210c3f2efe1f401.tar.bz2 |
fixed minor conversion warning
ptr diff -> U32
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -717,9 +717,10 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( unsigned searchMatchNb = acceleration << LZ4_skipTrigger; do { U32 const h = forwardH; - U32 const current = forwardIp - base; + U32 const current = (U32)(forwardIp - base); U32 matchIndex = LZ4_getIndexOnHash(h, cctx->hashTable, tableType); assert(matchIndex <= current); + assert(forwardIp - base < (ptrdiff_t)(2 GB - 1)); ip = forwardIp; assert(searchMatchNb >= (1<<LZ4_skipTrigger)); forwardIp += (searchMatchNb++ >> LZ4_skipTrigger); |