From: W. Felix Handte Date: Mon, 30 Aug 2021 16:27:49 +0000 (-0400) Subject: Fix VS Build: Explicitly Cast to Narrow Ints X-Git-Tag: v1.5.1~1^2~116^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6fd7761c963db8b88c14210f9ca1f972fe7fd71;p=thirdparty%2Fzstd.git Fix VS Build: Explicitly Cast to Narrow Ints --- diff --git a/lib/compress/zstd_fast.c b/lib/compress/zstd_fast.c index 33a392dfa..2555e0720 100644 --- a/lib/compress/zstd_fast.c +++ b/lib/compress/zstd_fast.c @@ -166,7 +166,7 @@ _start: /* Requires: ip0 */ const U32 rval = MEM_read32(ip2 - rep_offset1); /* write back hash table entry */ - current0 = ip0 - base; + current0 = (U32)(ip0 - base); hashTable[hash0] = current0; /* check repcode at ip[2] */ @@ -207,7 +207,7 @@ _start: /* Requires: ip0 */ ip2 = ip3; /* write back hash table entry */ - current0 = ip0 - base; + current0 = (U32)(ip0 - base); hashTable[hash0] = current0; /* load match for ip[0] */ @@ -285,7 +285,7 @@ _match: /* Requires: ip0, match0, offcode */ /* write next hash table entry */ if (ip1 < ip0) { - hashTable[hash1] = ip1 - base; + hashTable[hash1] = (U32)(ip1 - base); } /* Fill table and check for immediate repcode. */