mirror of
https://github.com/facebook/zstd.git
synced 2025-08-05 19:15:58 +03:00
Fix warnings
This commit is contained in:
@@ -1088,9 +1088,8 @@ static int basicUnitTests(U32 seed, double compressibility)
|
|||||||
CHECK_Z(ZSTD_CCtx_setParameter(zc, ZSTD_p_checksumFlag, 1));
|
CHECK_Z(ZSTD_CCtx_setParameter(zc, ZSTD_p_checksumFlag, 1));
|
||||||
/* Write a bunch of 6 byte blocks */
|
/* Write a bunch of 6 byte blocks */
|
||||||
while (remainingInput > 0) {
|
while (remainingInput > 0) {
|
||||||
const size_t kSmallBlockSize = 6;
|
char testBuffer[6] = "\xAA\xAA\xAA\xAA\xAA\xAA";
|
||||||
char testBuffer[kSmallBlockSize] = "\xAA\xAA\xAA\xAA\xAA\xAA";
|
const size_t kSmallBlockSize = sizeof(testBuffer);
|
||||||
const size_t outStart = out.pos;
|
|
||||||
ZSTD_inBuffer in = {testBuffer, kSmallBlockSize, 0};
|
ZSTD_inBuffer in = {testBuffer, kSmallBlockSize, 0};
|
||||||
|
|
||||||
CHECK_Z(ZSTD_compress_generic(zc, &out, &in, ZSTD_e_flush));
|
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 */
|
/* Write several very long offset matches into the dictionary */
|
||||||
for (int offset = 1024; offset >= 0; offset -= 128) {
|
for (int offset = 1024; offset >= 0; offset -= 128) {
|
||||||
size_t start = out.pos;
|
|
||||||
ZSTD_inBuffer in = {dictionary.start + offset, 128, 0};
|
ZSTD_inBuffer in = {dictionary.start + offset, 128, 0};
|
||||||
ZSTD_EndDirective flush = offset > 0 ? ZSTD_e_continue : ZSTD_e_end;
|
ZSTD_EndDirective flush = offset > 0 ? ZSTD_e_continue : ZSTD_e_end;
|
||||||
CHECK_Z(ZSTD_compress_generic(zc, &out, &in, flush));
|
CHECK_Z(ZSTD_compress_generic(zc, &out, &in, flush));
|
||||||
|
Reference in New Issue
Block a user