mirror of
https://github.com/facebook/zstd
synced 2026-08-22 22:32:07 -04:00
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:
parent
7d777bbfe2
commit
bf7504bf1a
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue