From: test4973 Date: Tue, 10 Apr 2018 00:08:17 +0000 (-0700) Subject: fixed minor conversion warning X-Git-Tag: upstream/1.9.3~8^2~33^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf2f06a6c5046ef7d576bc8ad210c3f2efe1f401;p=platform%2Fupstream%2Flz4.git fixed minor conversion warning ptr diff -> U32 --- diff --git a/lib/lz4.c b/lib/lz4.c index 3db37b0..a3c2860 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -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);