From 11cd2ea43da644cf3f2bcc088e183290619e9cf7 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 3 Oct 2018 16:37:50 -0700 Subject: [PATCH] finalized minor warnings on Haiku --- NEWS | 3 ++- lib/legacy/zstd_v05.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 1e26f1b18..40805c187 100644 --- 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 diff --git a/lib/legacy/zstd_v05.c b/lib/legacy/zstd_v05.c index 6f4dc72b7..a1580a271 100644 --- a/lib/legacy/zstd_v05.c +++ b/lib/legacy/zstd_v05.c @@ -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; -- 2.47.2