Skip to content

Commit f42dee2

Browse files
authored
Merge pull request #4500 from facebook/legacy01_init
fix minor initialization warnings
2 parents a8f732e + 17888b3 commit f42dee2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/legacy/zstd_v01.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,11 +1823,12 @@ static size_t ZSTD_decompressSequences(
18231823
BYTE* const ostart = (BYTE* const)dst;
18241824
BYTE* op = ostart;
18251825
BYTE* const oend = ostart + maxDstSize;
1826-
size_t errorCode, dumpsLength;
1826+
size_t errorCode = 0;
1827+
size_t dumpsLength = 0;
18271828
const BYTE* litPtr = litStart;
18281829
const BYTE* const litEnd = litStart + litSize;
1829-
int nbSeq;
1830-
const BYTE* dumps;
1830+
int nbSeq = 0;
1831+
const BYTE* dumps = NULL;
18311832
U32* DTableLL = dctx->LLTable;
18321833
U32* DTableML = dctx->MLTable;
18331834
U32* DTableOffb = dctx->OffTable;
@@ -1915,7 +1916,7 @@ size_t ZSTDv01_decompressDCtx(void* ctx, void* dst, size_t maxDstSize, const voi
19151916
size_t remainingSize = srcSize;
19161917
U32 magicNumber;
19171918
size_t errorCode=0;
1918-
blockProperties_t blockProperties;
1919+
blockProperties_t blockProperties = { 0 };
19191920

19201921
/* Frame Header */
19211922
if (srcSize < ZSTD_frameHeaderSize+ZSTD_blockHeaderSize) return ERROR(srcSize_wrong);

0 commit comments

Comments
 (0)