diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2019-04-18 23:06:02 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2019-04-18 23:07:16 (GMT) |
commit | 0b876db6d42ec22da0c635e97a0d690908f2104a (patch) | |
tree | 2ee943a56f12698153a5e0c305a65a2f7016ad7a /tests | |
parent | 5a6d72447ae998b387794df1135023689aa89995 (diff) | |
download | lz4-0b876db6d42ec22da0c635e97a0d690908f2104a.zip lz4-0b876db6d42ec22da0c635e97a0d690908f2104a.tar.gz lz4-0b876db6d42ec22da0c635e97a0d690908f2104a.tar.bz2 |
address a few minor Visual warnings
and created target cxx17build
Diffstat (limited to 'tests')
-rw-r--r-- | tests/frametest.c | 7 | ||||
-rw-r--r-- | tests/fullbench.c | 4 | ||||
-rw-r--r-- | tests/fuzzer.c | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/frametest.c b/tests/frametest.c index 9f7cb8d..bf95beb 100644 --- a/tests/frametest.c +++ b/tests/frametest.c @@ -667,8 +667,8 @@ int basicTests(U32 seed, double compressibility) for (blockSizeID = 4; blockSizeID < 8; ++blockSizeID) { result = LZ4F_getBlockSize(blockSizeID); CHECK(result); - DISPLAYLEVEL(3, "Returned block size of %zu bytes for blockID %u \n", - result, blockSizeID); + DISPLAYLEVEL(3, "Returned block size of %u bytes for blockID %u \n", + (unsigned)result, blockSizeID); } /* Test an invalid input that's too large */ @@ -770,7 +770,8 @@ static void locateBuffDiff(const void* buff1, const void* buff2, size_t size, un const BYTE* b2=(const BYTE*)buff2; DISPLAY("locateBuffDiff: looking for error position \n"); if (nonContiguous) { - DISPLAY("mode %u: non-contiguous output (%zu bytes), cannot search \n", nonContiguous, size); + DISPLAY("mode %u: non-contiguous output (%u bytes), cannot search \n", + nonContiguous, (unsigned)size); return; } while (p < size && b1[p]==b2[p]) p++; diff --git a/tests/fullbench.c b/tests/fullbench.c index 1a52aab..d2af662 100644 --- a/tests/fullbench.c +++ b/tests/fullbench.c @@ -162,13 +162,13 @@ static LZ4_stream_t LZ4_stream; static void local_LZ4_resetDictT(void) { void* const r = LZ4_initStream(&LZ4_stream, sizeof(LZ4_stream)); - assert(r != NULL); + assert(r != NULL); (void)r; } static void local_LZ4_createStream(void) { void* const r = LZ4_initStream(&LZ4_stream, sizeof(LZ4_stream)); - assert(r != NULL); + assert(r != NULL); (void)r; } static int local_LZ4_saveDict(const char* in, char* out, int inSize) diff --git a/tests/fuzzer.c b/tests/fuzzer.c index 78f90a1..9908a7b 100644 --- a/tests/fuzzer.c +++ b/tests/fuzzer.c @@ -490,6 +490,7 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c /* Test decompress_fast() with input buffer size exactly correct => must not read out of bound */ { char* const cBuffer_exact = (char*)malloc((size_t)compressedSize); assert(cBuffer_exact != NULL); + assert(compressedSize <= compressedBufferSize); memcpy(cBuffer_exact, compressedBuffer, compressedSize); /* Test decoding with output size exactly correct => must work */ @@ -1302,9 +1303,8 @@ static void FUZ_unitTests(int compressionLevel) int iNext = 0; int dNext = 0; int compressedSize; - size_t const testVerifySize = testInputSize; - assert((size_t)dBufferSize * 2 + 1 < testVerifySize); /* space used by ringBufferSafe and ringBufferFast */ + assert((size_t)dBufferSize * 2 + 1 < testInputSize); /* space used by ringBufferSafe and ringBufferFast */ XXH64_reset(&xxhOrig, 0); XXH64_reset(&xxhNewSafe, 0); XXH64_reset(&xxhNewFast, 0); |