[glib] Remove unnecessary casts
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Remove unnecessary casts
- Date: Sat, 28 May 2011 22:42:40 +0000 (UTC)
commit 05c7dcab37af27fc3fb7b64d0aca51fafc0eefe2
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 28 18:42:09 2011 -0400
Remove unnecessary casts
The new atomic implementations don't need these anymore to
avoid warnings.
glib/gthread.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/gthread.c b/glib/gthread.c
index 5a811ce..cefe88f 100644
--- a/glib/gthread.c
+++ b/glib/gthread.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]