From d6fd7761c963db8b88c14210f9ca1f972fe7fd71 Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Mon, 30 Aug 2021 12:27:49 -0400 Subject: [PATCH] Fix VS Build: Explicitly Cast to Narrow Ints --- lib/compress/zstd_fast.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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. */ -- 2.47.2