From: Yann Collet Date: Wed, 4 Nov 2015 16:41:20 +0000 (+0100) Subject: fix clang warning X-Git-Tag: zstd-0.3.3^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8455f51eac9ec84eeeb035dc1a92175fa3f1b2d;p=thirdparty%2Fzstd.git fix clang warning --- diff --git a/lib/zstdhc.c b/lib/zstdhc.c index e90b7f3a6..c061ecdbe 100644 --- a/lib/zstdhc.c +++ b/lib/zstdhc.c @@ -307,7 +307,7 @@ size_t ZSTD_HC_insertBtAndFindBestMatch ( if (matchLength > bestLength) { - if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit(current-matchIndex+1) - ZSTD_highbit(offsetPtr[0]+1)) ) + if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit(current-matchIndex+1) - ZSTD_highbit((U32)offsetPtr[0]+1)) ) bestLength = matchLength, *offsetPtr = current - matchIndex; if (ip+matchLength == iend) /* equal : no way to know if inf or sup */ break; /* drop, next to null, to guarantee consistency (is there a way to do better ?) */