mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
gmain: Initialise a variable
This fixes a scan-build warning: ``` ../../../../source/glib/glib/gmain.c:4193:18: warning: 2nd function call argument is an uninitialized value [core.CallAndMessage] while ((nfds = g_main_context_query (context, max_priority, &timeout, fds, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` This is a valid situation which can occur if the preceding `g_main_context_prepare()` call returns `FALSE` and doesn’t set `max_priority`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1767
This commit is contained in:
parent
7a1a9259a1
commit
86b8891add
@ -4147,7 +4147,7 @@ g_main_context_iterate (GMainContext *context,
|
||||
gboolean dispatch,
|
||||
GThread *self)
|
||||
{
|
||||
gint max_priority;
|
||||
gint max_priority = 0;
|
||||
gint timeout;
|
||||
gboolean some_ready;
|
||||
gint nfds, allocated_nfds;
|
||||
|
Loading…
Reference in New Issue
Block a user