gmain: Remove some redundant casts

These were introducing strict aliasing warnings. Remove them (in line
with other uses of `g_once_init_leave()`).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2019-10-07 16:29:26 +01:00
parent 3251cce524
commit d9b30d47a6

View File

@ -675,7 +675,7 @@ g_main_context_new (void)
GMainContext *
g_main_context_default (void)
{
static GMainContext *default_main_context;
static GMainContext *default_main_context = NULL;
if (g_once_init_enter (&default_main_context))
{
@ -690,8 +690,7 @@ g_main_context_default (void)
g_print ("default context=%p\n", context);
#endif
g_once_init_leave ((gsize *) &default_main_context, (gsize) context);
g_once_init_leave (&default_main_context, context);
}
return default_main_context;