]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fix clang warning 64/head
authorYann Collet <yann.collet.73@gmail.com>
Wed, 4 Nov 2015 16:41:20 +0000 (17:41 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Wed, 4 Nov 2015 16:41:20 +0000 (17:41 +0100)
lib/zstdhc.c

index e90b7f3a646fd0af9cdd47b314bf9a0c236518e2..c061ecdbef349a2eb9f02798ecfd9ec005767440 100644 (file)
@@ -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 ?) */