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:
Philip Withnall 2024-04-09 16:12:58 +01:00
parent 18cd1590c3
commit b3cd9aaa98
No known key found for this signature in database
GPG Key ID: DCDF5885B1F3ED73

View File

@ -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;