]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fix minor initialization warnings legacy01_init 4500/head
authorYann Collet <yann.collet.73@gmail.com>
Thu, 25 Sep 2025 05:08:03 +0000 (22:08 -0700)
committerYann Collet <yann.collet.73@gmail.com>
Thu, 25 Sep 2025 05:08:03 +0000 (22:08 -0700)
lib/legacy/zstd_v01.c

index 29e875713351d1875ab9bf9f4db4990dc5657c35..d3322f93e11f3c1e5e1cc5960338dcb4100ea056 100644 (file)
@@ -1823,11 +1823,12 @@ static size_t ZSTD_decompressSequences(
     BYTE* const ostart = (BYTE* const)dst;
     BYTE* op = ostart;
     BYTE* const oend = ostart + maxDstSize;
-    size_t errorCode, dumpsLength;
+    size_t errorCode = 0;
+    size_t dumpsLength = 0;
     const BYTE* litPtr = litStart;
     const BYTE* const litEnd = litStart + litSize;
-    int nbSeq;
-    const BYTE* dumps;
+    int nbSeq = 0;
+    const BYTE* dumps = NULL;
     U32* DTableLL = dctx->LLTable;
     U32* DTableML = dctx->MLTable;
     U32* DTableOffb = dctx->OffTable;
@@ -1915,7 +1916,7 @@ size_t ZSTDv01_decompressDCtx(void* ctx, void* dst, size_t maxDstSize, const voi
     size_t remainingSize = srcSize;
     U32 magicNumber;
     size_t errorCode=0;
-    blockProperties_t blockProperties;
+    blockProperties_t blockProperties = { 0 };
 
     /* Frame Header */
     if (srcSize < ZSTD_frameHeaderSize+ZSTD_blockHeaderSize) return ERROR(srcSize_wrong);