From 0e7a7f1def5db7b627130d38f25caae507f66de6 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Fri, 28 Sep 2018 12:14:24 -0700 Subject: [PATCH] Fix warnings --- tests/zstreamtest.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/zstreamtest.c b/tests/zstreamtest.c index d78f00683..d7c8567d4 100644 --- a/tests/zstreamtest.c +++ b/tests/zstreamtest.c @@ -1088,9 +1088,8 @@ static int basicUnitTests(U32 seed, double compressibility) CHECK_Z(ZSTD_CCtx_setParameter(zc, ZSTD_p_checksumFlag, 1)); /* Write a bunch of 6 byte blocks */ while (remainingInput > 0) { - const size_t kSmallBlockSize = 6; - char testBuffer[kSmallBlockSize] = "\xAA\xAA\xAA\xAA\xAA\xAA"; - const size_t outStart = out.pos; + char testBuffer[6] = "\xAA\xAA\xAA\xAA\xAA\xAA"; + const size_t kSmallBlockSize = sizeof(testBuffer); ZSTD_inBuffer in = {testBuffer, kSmallBlockSize, 0}; CHECK_Z(ZSTD_compress_generic(zc, &out, &in, ZSTD_e_flush)); @@ -1099,7 +1098,6 @@ static int basicUnitTests(U32 seed, double compressibility) } /* Write several very long offset matches into the dictionary */ for (int offset = 1024; offset >= 0; offset -= 128) { - size_t start = out.pos; ZSTD_inBuffer in = {dictionary.start + offset, 128, 0}; ZSTD_EndDirective flush = offset > 0 ? ZSTD_e_continue : ZSTD_e_end; CHECK_Z(ZSTD_compress_generic(zc, &out, &in, flush));