From 24187e0e61bad6fa4d606f11991eacdbd0546ed8 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Mon, 25 Sep 2023 01:04:05 +0200 Subject: [PATCH] Cast remove() to void to avoid coverity warning. --- regress/zip_read_file_fuzzer.c | 10 +++++----- regress/zip_write_encrypt_aes256_file_fuzzer.c | 2 +- regress/zip_write_encrypt_pkware_file_fuzzer.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/regress/zip_read_file_fuzzer.c b/regress/zip_read_file_fuzzer.c index 3cf1b3399..4bd0c74a0 100644 --- a/regress/zip_read_file_fuzzer.c +++ b/regress/zip_read_file_fuzzer.c @@ -49,7 +49,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { za = zip_open(name, 0, NULL); if (za == NULL) { - remove(name); + (void)remove(name); fprintf(stderr, "Error opening archive '%s'\n", name); return 1; } @@ -60,7 +60,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (f == NULL) { fprintf(stderr, "Unable to open file %d.\n", (int)i); zip_close(za); - remove(name); + (void)remove(name); return 1; } @@ -70,16 +70,16 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (zip_fclose(f) < 0) { fprintf(stderr, "Error closing file %d\n", (int)i); zip_close(za); - remove(name); + (void)remove(name); return 1; } } if (zip_close(za) < 0) { zip_discard(za); - remove(name); + (void)remove(name); fprintf(stderr, "Error closing archiv '%s'\n", name); return 1; } - remove(name); + (void)remove(name); return 0; } diff --git a/regress/zip_write_encrypt_aes256_file_fuzzer.c b/regress/zip_write_encrypt_aes256_file_fuzzer.c index c94114f73..81d018c20 100644 --- a/regress/zip_write_encrypt_aes256_file_fuzzer.c +++ b/regress/zip_write_encrypt_aes256_file_fuzzer.c @@ -65,7 +65,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { zip_discard(archive); return -1; } - remove(path); + (void)remove(path); return 0; } diff --git a/regress/zip_write_encrypt_pkware_file_fuzzer.c b/regress/zip_write_encrypt_pkware_file_fuzzer.c index 44025081f..ba87b7478 100644 --- a/regress/zip_write_encrypt_pkware_file_fuzzer.c +++ b/regress/zip_write_encrypt_pkware_file_fuzzer.c @@ -67,7 +67,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { zip_discard(archive); return -1; } - remove(path); + (void)remove(path); return 0; }