From bf7504bf1a65e48faa14f0293b1a961a81534b8e Mon Sep 17 00:00:00 2001 From: nileshpatil6 Date: Sat, 22 Aug 2026 21:55:33 +0530 Subject: [PATCH] tests: rename cSize in the new test to avoid shadowing basicUnitTests() already declares size_t cSize, so the inner declaration tripped -Wshadow and failed builds using MOREFLAGS=-Werror. --- tests/fuzzer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fuzzer.c b/tests/fuzzer.c index 3ff1d0fa1..2fd92a54e 100644 --- a/tests/fuzzer.c +++ b/tests/fuzzer.c @@ -4379,7 +4379,7 @@ static int basicUnitTests(U32 const seed, double compressibility) BYTE litBuffer[32]; ZSTD_Sequence seqs[2]; ZSTD_CCtx* const cctx = ZSTD_createCCtx(); - size_t cSize; + size_t cSizeTooLarge; size_t i; assert(cctx != NULL); @@ -4395,11 +4395,11 @@ static int basicUnitTests(U32 const seed, double compressibility) seqs[1].rep = 0; CHECK_Z(ZSTD_CCtx_setParameter(cctx, ZSTD_c_blockDelimiters, ZSTD_sf_explicitBlockDelimiters)); - cSize = ZSTD_compressSequencesAndLiterals(cctx, dst, dstCapacity, + cSizeTooLarge = ZSTD_compressSequencesAndLiterals(cctx, dst, dstCapacity, seqs, 2, litBuffer, litLen, sizeof(litBuffer), blockSize); - if (!ZSTD_isError(cSize)) { + if (!ZSTD_isError(cSizeTooLarge)) { DISPLAY("ZSTD_compressSequencesAndLiterals() should have failed: sequences define a block larger than ZSTD_BLOCKSIZE_MAX\n"); ZSTD_freeCCtx(cctx); goto _output_error;