diff options
author | Richard Hughes <richard@hughsie.com> | 2022-04-13 13:46:05 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2022-04-13 13:50:17 +0100 |
commit | a9c248d2bb37f95845ab1ebf9cd9fa0b97ae466e (patch) | |
tree | 7a499477014dc7541f38179b6d9b424373aaaae1 | |
parent | 4ebebc86153983354b1284ceabd9c4281e518b4a (diff) | |
download | gcab-a9c248d2bb37f95845ab1ebf9cd9fa0b97ae466e.tar.gz |
trivial: Ignore Coverity warnings when not checking setenv()
-rw-r--r-- | src/gcab-fuzz.c | 2 | ||||
-rw-r--r-- | tests/gcab-self-test.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gcab-fuzz.c b/src/gcab-fuzz.c index e66003d..672b963 100644 --- a/src/gcab-fuzz.c +++ b/src/gcab-fuzz.c @@ -68,7 +68,7 @@ main (int argc, char *argv[]) } /* try to extract each file */ - g_setenv ("GCAB_SKIP_CHECKSUM", "1", FALSE); + (void)g_setenv ("GCAB_SKIP_CHECKSUM", "1", FALSE); for (gint i = 1; i < argc; i++) { g_autoptr(GFile) file = g_file_new_for_commandline_arg (argv[i]); if (!_process_file (file, &error)) { diff --git a/tests/gcab-self-test.c b/tests/gcab-self-test.c index c9b2aab..66f1edb 100644 --- a/tests/gcab-self-test.c +++ b/tests/gcab-self-test.c @@ -419,7 +419,7 @@ gcab_test_cabinet_error_cves_func (void) "CVE-2015-4470.cab", "CVE-2015-4471.cab", NULL }; - g_setenv ("GCAB_SKIP_CHECKSUM", "1", TRUE); + (void)g_setenv ("GCAB_SKIP_CHECKSUM", "1", TRUE); for (guint i = 0; tests[i] != NULL; i++) { gboolean ret; g_autofree gchar *fn = NULL; @@ -572,7 +572,7 @@ main (int argc, char **argv) /* only critical and error are fatal */ g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); - g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); + (void)g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); /* tests go here */ g_test_add_func ("/GCab/file", gcab_test_file_func); |