daemon/command.c daemon/debug.c df/main.c: Ignore bogus GCC analyzer warnings

See upstream bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99193

(cherry picked from commit 4af1c631a2)
This commit is contained in:
Richard W.M. Jones
2021-02-22 10:07:10 +00:00
parent 009df75065
commit 071bd4e33a
3 changed files with 12 additions and 0 deletions

View File

@@ -102,6 +102,9 @@ commandf (char **stdoutput, char **stderror, unsigned flags,
return r;
}
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99193
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wanalyzer-mismatching-deallocation"
/**
* Same as C<command>, but we allow the status code from the
* subcommand to be non-zero, and return that status code.
@@ -150,6 +153,7 @@ commandrf (char **stdoutput, char **stderror, unsigned flags,
return r;
}
#pragma GCC diagnostic pop
/**
* Same as C<command>, but passing in an argv array.

View File

@@ -111,6 +111,9 @@ do_debug (const char *subcmd, char *const *argv)
return NULL;
}
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99193
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wanalyzer-mismatching-deallocation"
static char *
debug_help (const char *subcmd, size_t argc, char *const *const argv)
{
@@ -140,6 +143,7 @@ debug_help (const char *subcmd, size_t argc, char *const *const argv)
return r;
}
#pragma GCC diagnostic pop
/* Show open FDs. */
static char *

View File

@@ -374,6 +374,9 @@ single_drive_display_name (struct drv *drvs)
}
#pragma GCC diagnostic pop
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99193
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wanalyzer-mismatching-deallocation"
static char *
make_display_name (struct drv *drvs)
{
@@ -411,3 +414,4 @@ make_display_name (struct drv *drvs)
return ret;
}
#pragma GCC diagnostic pop