diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/example.c | 12 | ||||
| -rw-r--r-- | test/fuzz/checksum_fuzzer.c | 1 | ||||
| -rw-r--r-- | test/fuzz/minigzip_fuzzer.c | 2 | ||||
| -rw-r--r-- | test/fuzz/standalone_fuzz_target_runner.c | 1 |
4 files changed, 9 insertions, 7 deletions
diff --git a/test/example.c b/test/example.c index bd1665ee91..4b78f21d85 100644 --- a/test/example.c +++ b/test/example.c @@ -561,7 +561,7 @@ void test_deflate_bound(unsigned char *compr, size_t comprLen) c_stream.zfree = zfree; c_stream.opaque = (voidpf)0; c_stream.avail_in = len; - c_stream.next_in = hello; + c_stream.next_in = (const unsigned char *)hello; c_stream.avail_out = 0; c_stream.next_out = outBuf; @@ -608,7 +608,7 @@ void test_deflate_copy(unsigned char *compr, size_t comprLen) err = PREFIX(deflateInit)(&c_stream, Z_DEFAULT_COMPRESSION); CHECK_ERR(err, "deflateInit"); - c_stream.next_in = hello; + c_stream.next_in = (const unsigned char *)hello; c_stream.next_out = compr; while (c_stream.total_in != len && c_stream.total_out < comprLen) { @@ -656,7 +656,7 @@ void test_deflate_get_dict(unsigned char *compr, size_t comprLen) c_stream.next_out = compr; c_stream.avail_out = (uInt)comprLen; - c_stream.next_in = hello; + c_stream.next_in = (const unsigned char *)hello; c_stream.avail_in = (unsigned int)strlen(hello)+1; err = PREFIX(deflate)(&c_stream, Z_FINISH); @@ -701,7 +701,7 @@ void test_deflate_pending(unsigned char *compr, size_t comprLen) err = PREFIX(deflateInit)(&c_stream, Z_DEFAULT_COMPRESSION); CHECK_ERR(err, "deflateInit"); - c_stream.next_in = hello; + c_stream.next_in = (const unsigned char *)hello; c_stream.next_out = compr; while (c_stream.total_in != len && c_stream.total_out < comprLen) { @@ -761,7 +761,7 @@ void test_deflate_pending(unsigned char *compr, size_t comprLen) printf("deflatePrime(): OK\n"); } - c_stream.next_in = hello; + c_stream.next_in = (const unsigned char *)hello; c_stream.next_out = compr; while (c_stream.total_in != len && c_stream.total_out < comprLen) { @@ -858,7 +858,7 @@ void test_deflate_tune(unsigned char *compr, size_t comprLen) printf("deflateTune(): OK\n"); } - c_stream.next_in = hello; + c_stream.next_in = (const unsigned char *)hello; c_stream.next_out = compr; while (c_stream.total_in != len && c_stream.total_out < comprLen) { diff --git a/test/fuzz/checksum_fuzzer.c b/test/fuzz/checksum_fuzzer.c index 10fc138fb8..a50a9a6876 100644 --- a/test/fuzz/checksum_fuzzer.c +++ b/test/fuzz/checksum_fuzzer.c @@ -41,6 +41,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataLen) { uint32_t crc4 = PREFIX(crc32_combine_op)(crc1, crc3, op); crc1 = PREFIX(crc32_z)(crc1, data + offset, buffSize); assert(crc1 == crc4); + (void)crc4; } crc1 = PREFIX(crc32_z)(crc1, data + offset, dataLen % buffSize); diff --git a/test/fuzz/minigzip_fuzzer.c b/test/fuzz/minigzip_fuzzer.c index d0c35571f7..5d2f1066a0 100644 --- a/test/fuzz/minigzip_fuzzer.c +++ b/test/fuzz/minigzip_fuzzer.c @@ -62,7 +62,7 @@ #define BUFLENW (BUFLEN * 3) /* write buffer size */ #define MAX_NAME_LEN 1024 -static char *prog; +static const char *prog = "minigzip_fuzzer"; void error (const char *msg); void gz_compress (FILE *in, gzFile out); diff --git a/test/fuzz/standalone_fuzz_target_runner.c b/test/fuzz/standalone_fuzz_target_runner.c index 5a5c750967..91144efb24 100644 --- a/test/fuzz/standalone_fuzz_target_runner.c +++ b/test/fuzz/standalone_fuzz_target_runner.c @@ -28,6 +28,7 @@ int main(int argc, char **argv) { free(buf); err = fclose(f); assert(err == 0); + (void)err; fprintf(stderr, "Done: %s: (%d bytes)\n", argv[i], (int)n_read); } |
