From b1e888b60e505b8d5a68e349a6e9e3966187d2de Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Thu, 12 Jul 2007 22:51:56 +0000 Subject: [PATCH] fixed missing pointer casts when using atomic ops. Fri Jul 13 00:50:40 2007 Tim Janik * glib/gthread.[hc]: fixed missing pointer casts when using atomic ops. svn path=/trunk/; revision=5637 --- ChangeLog | 4 ++++ glib/gthread.c | 6 +++--- glib/gthread.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index edea2e36f..f0ec3ad12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Jul 13 00:50:40 2007 Tim Janik + + * glib/gthread.[hc]: fixed missing pointer casts when using atomic ops. + 2007-07-12 Matthias Clasen * configure.in: Bump version diff --git a/glib/gthread.c b/glib/gthread.c index e040524f9..72ec8ee00 100644 --- a/glib/gthread.c +++ b/glib/gthread.c @@ -223,11 +223,11 @@ void g_once_init_leave (volatile gsize *value_location, gsize initialization_value) { - g_return_if_fail (g_atomic_pointer_get (value_location) == 0); + g_return_if_fail (g_atomic_pointer_get ((void*) value_location) == 0); g_return_if_fail (initialization_value != 0); g_return_if_fail (g_once_init_list != NULL); - g_atomic_pointer_set (value_location, initialization_value); + g_atomic_pointer_set ((void*) value_location, (void*) 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); @@ -255,7 +255,7 @@ g_static_mutex_get_mutex_impl (GMutex** mutex) g_mutex_lock (g_once_mutex); if (!(*mutex)) - g_atomic_pointer_set (mutex, g_mutex_new()); + g_atomic_pointer_set ((void*) mutex, g_mutex_new()); g_mutex_unlock (g_once_mutex); diff --git a/glib/gthread.h b/glib/gthread.h index 2076185e3..6ccc9649f 100644 --- a/glib/gthread.h +++ b/glib/gthread.h @@ -332,7 +332,7 @@ void g_once_init_leave (volatile gsize *value_location, G_INLINE_FUNC gboolean g_once_init_enter (volatile gsize *value_location) { - if G_LIKELY (g_atomic_pointer_get (value_location) !=0) + if G_LIKELY (g_atomic_pointer_get ((void*) value_location) !=0) return FALSE; else return g_once_init_enter_impl (value_location); -- 2.34.1