From: Yann Collet Date: Mon, 28 Dec 2020 22:07:31 +0000 (-0800) Subject: fixed minor warnings introduced in #2439 X-Git-Tag: v1.4.9^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f8be046b95a9aef96db5a6e85696144d94caeee;p=thirdparty%2Fzstd.git fixed minor warnings introduced in #2439 --- diff --git a/tests/fuzzer.c b/tests/fuzzer.c index 71ed3e0b8..d8199300b 100644 --- a/tests/fuzzer.c +++ b/tests/fuzzer.c @@ -1571,9 +1571,9 @@ static int basicUnitTests(U32 const seed, double compressibility) /* only use the first half so we don't push against size limit of compressedBuffer */ size_t const segSize = (CNBuffSize / 2) / segs; - U32 skippableSize; const U32 skipLen = 129 KB; - char* skipBuff = (char*)malloc(skipLen); + char* const skipBuff = (char*)malloc(skipLen); + assert(skipBuff != NULL); memset(skipBuff, 0, skipLen); for (i = 0; i < segs; i++) { CHECK_NEWV(r, ZSTD_compress( @@ -1583,7 +1583,9 @@ static int basicUnitTests(U32 const seed, double compressibility) off += r; if (i == segs/2) { /* insert skippable frame */ - skippableSize = ZSTD_writeSkippableFrame(compressedBuffer + off, compressedBufferSize, skipBuff, skipLen, seed % 15); + size_t const skippableSize = + ZSTD_writeSkippableFrame(compressedBuffer + off, compressedBufferSize, + skipBuff, skipLen, seed % 15); CHECK_Z(skippableSize); off += skippableSize; } @@ -2744,7 +2746,7 @@ static int basicUnitTests(U32 const seed, double compressibility) free(seqs); } DISPLAYLEVEL(3, "OK \n"); - + DISPLAYLEVEL(3, "test%3i : ZSTD_getSequences followed by ZSTD_compressSequences : ", testNb++); { size_t srcSize = 500 KB;