Skip to content

Commit 4c1f86c

Browse files
committed
fix minor warning in legacy decoders
for mingw + clang CI test
1 parent ee9b5f4 commit 4c1f86c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/legacy/zstd_v01.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static unsigned FSE_isError(size_t code) { return (code > (size_t)(-FSE_ERROR_ma
430430

431431
static short FSE_abs(short a)
432432
{
433-
return a<0? -a : a;
433+
return a<0? (short)-a : a;
434434
}
435435

436436

lib/legacy/zstd_v03.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ static unsigned FSE_isError(size_t code) { return ERR_isError(code); }
11111111
****************************************************************/
11121112
static short FSE_abs(short a)
11131113
{
1114-
return a<0 ? -a : a;
1114+
return a<0 ? (short)-a : a;
11151115
}
11161116

11171117
static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,

lib/legacy/zstd_v04.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ static unsigned FSE_isError(size_t code) { return ERR_isError(code); }
10941094
****************************************************************/
10951095
static short FSE_abs(short a)
10961096
{
1097-
return a<0 ? -a : a;
1097+
return a<0 ? (short)-a : a;
10981098
}
10991099

11001100
static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,

lib/legacy/zstd_v05.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ const char* FSEv05_getErrorName(size_t code) { return ERR_getErrorName(code); }
12241224
/*-**************************************************************
12251225
* FSEv05 NCount encoding-decoding
12261226
****************************************************************/
1227-
static short FSEv05_abs(short a) { return a<0 ? -a : a; }
1227+
static short FSEv05_abs(short a) { return a<0 ? (short)-a : a; }
12281228

12291229

12301230
size_t FSEv05_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,

lib/legacy/zstd_v06.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ static unsigned HUFv06_isError(size_t code) { return ERR_isError(code); }
12021202
/*-**************************************************************
12031203
* FSE NCount encoding-decoding
12041204
****************************************************************/
1205-
static short FSEv06_abs(short a) { return a<0 ? -a : a; }
1205+
static short FSEv06_abs(short a) { return a<0 ? (short)-a : a; }
12061206

12071207
size_t FSEv06_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
12081208
const void* headerBuffer, size_t hbSize)

0 commit comments

Comments
 (0)