mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 16:36: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 *
|
GMainContext *
|
||||||
g_main_context_default (void)
|
g_main_context_default (void)
|
||||||
{
|
{
|
||||||
static GMainContext *default_main_context;
|
static GMainContext *default_main_context = NULL;
|
||||||
|
|
||||||
if (g_once_init_enter (&default_main_context))
|
if (g_once_init_enter (&default_main_context))
|
||||||
{
|
{
|
||||||
@ -690,8 +690,7 @@ g_main_context_default (void)
|
|||||||
g_print ("default context=%p\n", context);
|
g_print ("default context=%p\n", context);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_once_init_leave ((gsize *) &default_main_context, (gsize) context);
|
g_once_init_leave (&default_main_context, context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return default_main_context;
|
return default_main_context;
|
||||||
|
Loading…
Reference in New Issue
Block a user