mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
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:
parent
3251cce524
commit
d9b30d47a6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user