mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
gdesktopappinfo: Fix a maybe-uninitialized warning
scan-build thinks that `term_arg` could be used uninitialised. I think there isn’t a bug here because that use is protected by the `found_terminal == NULL` check and early return. But perhaps that logic is a bit too complex for static analysis, so add a default value for the variable. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #1767
This commit is contained in:
parent
18cd1590c3
commit
b3cd9aaa98
@ -2687,7 +2687,7 @@ prepend_terminal_to_vector (int *argc,
|
||||
size_t term_argc;
|
||||
char *found_terminal;
|
||||
char **the_argv;
|
||||
const char *term_arg;
|
||||
const char *term_arg = NULL;
|
||||
static const struct {
|
||||
const char *exec;
|
||||
const char *exec_arg;
|
||||
|
Loading…
Reference in New Issue
Block a user