mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 19:55:12 +01:00
Remove unnecessary casts
The new atomic implementations don't need these anymore to avoid warnings.
This commit is contained in:
parent
d09443fe20
commit
05c7dcab37
@ -1104,7 +1104,7 @@ g_once_init_enter_impl (volatile gsize *value_location)
|
||||
{
|
||||
gboolean need_init = FALSE;
|
||||
g_mutex_lock (g_once_mutex);
|
||||
if (g_atomic_pointer_get ((void**) value_location) == NULL)
|
||||
if (g_atomic_pointer_get (value_location) == NULL)
|
||||
{
|
||||
if (!g_slist_find (g_once_init_list, (void*) value_location))
|
||||
{
|
||||
@ -1138,11 +1138,11 @@ void
|
||||
g_once_init_leave (volatile gsize *value_location,
|
||||
gsize initialization_value)
|
||||
{
|
||||
g_return_if_fail (g_atomic_pointer_get ((void**)value_location) == NULL);
|
||||
g_return_if_fail (g_atomic_pointer_get (value_location) == NULL);
|
||||
g_return_if_fail (initialization_value != 0);
|
||||
g_return_if_fail (g_once_init_list != NULL);
|
||||
|
||||
g_atomic_pointer_set ((void**)value_location, (void*) initialization_value);
|
||||
g_atomic_pointer_set (value_location, initialization_value);
|
||||
g_mutex_lock (g_once_mutex);
|
||||
g_once_init_list = g_slist_remove (g_once_init_list, (void*) value_location);
|
||||
g_cond_broadcast (g_once_cond);
|
||||
|
Loading…
x
Reference in New Issue
Block a user