summaryrefslogtreecommitdiffstats
path: root/tests/fuzzer.c
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2016-11-14 18:16:11 (GMT)
committerYann Collet <cyan@fb.com>2016-11-14 18:16:11 (GMT)
commit201149f8eb456c499014e772cdbd298045afbec3 (patch)
tree6f2190653c41b22aafbbceb688c2956cbbb45cf8 /tests/fuzzer.c
parentfa158b4118f2d53f6e84ce6ce16aa8d3ccd8a11a (diff)
downloadlz4-201149f8eb456c499014e772cdbd298045afbec3.zip
lz4-201149f8eb456c499014e772cdbd298045afbec3.tar.gz
lz4-201149f8eb456c499014e772cdbd298045afbec3.tar.bz2
fixed conversion warnings
Diffstat (limited to 'tests/fuzzer.c')
-rw-r--r--tests/fuzzer.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/tests/fuzzer.c b/tests/fuzzer.c
index 50f6871..301b01a 100644
--- a/tests/fuzzer.c
+++ b/tests/fuzzer.c
@@ -300,24 +300,8 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c
}
/* move to startCycle */
- for (cycleNb = 0; cycleNb < startCycle; cycleNb++) {
- U32 randState = FUZ_rand(&coreRandState) ^ PRIME3;
-
- if (0) { /* some problems can be related to dictionary re-use; in this case, enable this loop */
- int const blockSize = FUZ_rand(&randState) % FUZ_MAX_BLOCK_SIZE;
- int const blockStart = FUZ_rand(&randState) % (COMPRESSIBLE_NOISE_LENGTH - blockSize);
- int const dictSizeRand = FUZ_rand(&randState) % FUZ_MAX_DICT_SIZE;
- int const dictSize = MIN(dictSizeRand, blockStart);
- char* const block = ((char*)CNBuffer) + blockStart;
- const char* const dict = block - dictSize;
- FUZ_displayUpdate(cycleNb);
- LZ4_loadDict(&LZ4dict, dict, dictSize);
- LZ4_compress_fast_continue(&LZ4dict, block, compressedBuffer, blockSize, compressedBufferSize, 1);
- LZ4_loadDict(&LZ4dict, dict, dictSize);
- LZ4_compress_fast_continue(&LZ4dict, block, compressedBuffer, blockSize, compressedBufferSize, 1);
- LZ4_loadDict(&LZ4dict, dict, dictSize);
- LZ4_compress_fast_continue(&LZ4dict, block, compressedBuffer, blockSize, compressedBufferSize, 1);
- } }
+ for (cycleNb = 0; cycleNb < startCycle; cycleNb++)
+ (void) FUZ_rand(&coreRandState); /* sync coreRandState */
/* Main test loop */
for (cycleNb = startCycle;