]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
finalized minor warnings on Haiku 1351/head
authorYann Collet <cyan@fb.com>
Wed, 3 Oct 2018 23:37:50 +0000 (16:37 -0700)
committerYann Collet <cyan@fb.com>
Wed, 3 Oct 2018 23:37:50 +0000 (16:37 -0700)
NEWS
lib/legacy/zstd_v05.c

diff --git a/NEWS b/NEWS
index 1e26f1b180bbc064c46ee0ea5cda06a99bec7a4a..40805c187917d7a343866a3b93ed0a98efb9967c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,7 +7,8 @@ cli : new command --adapt, for automatic compression level adaptation
 api : fix : block api can be streamed with > 4 GB, reported by @catid
 api : reduced ZSTD_DDict size by 2 KB
 api : minimum negative compression level is defined, and can be queried using ZSTD_minCLevel().
-build: Reading legacy format is limited to v0.5+ by default. Can be changed at compile time using macro ZSTD_LEGACY_SUPPORT.
+build: support Haiku target, by @korli
+build: Read Legacy format is limited to v0.5+ by default. Can be changed at compile time with macro ZSTD_LEGACY_SUPPORT.
 doc : zstd_compression_format.md updated to match wording in IETF RFC 8478
 misc: tests/paramgrill, a parameter optimizer, by @GeorgeLu97
 
index 6f4dc72b732250c5ed07d57a32ef11bef24e3379..a1580a271eea43df54160b8a2649a506621cb8d6 100644 (file)
@@ -3300,11 +3300,11 @@ static size_t ZSTDv05_decompressSequences(
     BYTE* const ostart = (BYTE* const)dst;
     BYTE* op = ostart;
     BYTE* const oend = ostart + maxDstSize;
-    size_t errorCode, dumpsLength;
+    size_t errorCode, dumpsLength=0;
     const BYTE* litPtr = dctx->litPtr;
     const BYTE* const litEnd = litPtr + dctx->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;
@@ -3413,10 +3413,10 @@ static size_t ZSTDv05_decompress_continueDCtx(ZSTDv05_DCtx* dctx,
     BYTE* const oend = ostart + maxDstSize;
     size_t remainingSize = srcSize;
     blockProperties_t blockProperties;
+    memset(&blockProperties, 0, sizeof(blockProperties));
 
     /* Frame Header */
-    {
-        size_t frameHeaderSize;
+    {   size_t frameHeaderSize;
         if (srcSize < ZSTDv05_frameHeaderSize_min+ZSTDv05_blockHeaderSize) return ERROR(srcSize_wrong);
         frameHeaderSize = ZSTDv05_decodeFrameHeader_Part1(dctx, src, ZSTDv05_frameHeaderSize_min);
         if (ZSTDv05_isError(frameHeaderSize)) return frameHeaderSize;