[glib: 1/2] fuzzing: Fix test failure with G_DISABLE_ASSERT
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] fuzzing: Fix test failure with G_DISABLE_ASSERT
- Date: Mon, 14 Mar 2022 12:25:34 +0000 (UTC)
commit b1315988fc19f68b319aa0de0f4ec8bb54ea0d32
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue Mar 8 11:52:30 2022 +0000
fuzzing: Fix test failure with G_DISABLE_ASSERT
https://gitlab.gnome.org/GNOME/glib/-/jobs/1875915
```
../fuzzing/fuzz_paths.c: In function ‘LLVMFuzzerTestOneInput’:
../fuzzing/fuzz_paths.c:7:16: error: variable ‘skipped_root’ set but not used
[-Werror=unused-but-set-variable]
7 | const gchar *skipped_root;
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
```
Signed-off-by: Philip Withnall <pwithnall endlessos org>
fuzzing/fuzz_paths.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/fuzzing/fuzz_paths.c b/fuzzing/fuzz_paths.c
index fbed84771..948159430 100644
--- a/fuzzing/fuzz_paths.c
+++ b/fuzzing/fuzz_paths.c
@@ -4,7 +4,7 @@ int
LLVMFuzzerTestOneInput (const unsigned char *data, size_t size)
{
unsigned char *nul_terminated_data = NULL;
- const gchar *skipped_root;
+ const gchar *skipped_root G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
gchar *basename = NULL, *dirname = NULL;
fuzz_set_logging_func ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]