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.
This commit is contained in:
nileshpatil6 2026-08-22 21:55:33 +05:30
parent 7d777bbfe2
commit bf7504bf1a
No known key found for this signature in database

View file

@ -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;