From 5c32d5236f576344ebd43275589084a0fd1e4970 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 5 Dec 2005 13:37:55 +0000 Subject: [PATCH] Fix compiler warnings. 2005-12-05 Matthias Clasen * tests/libmoduletestplugin_a.c: Fix compiler warnings. * glib/gatomic.c: In the ia64 implementation, use __sync builtin without _si or _di suffix. (#321229, Stanislav Brabec, patch by Andreas Schwab) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ glib/gatomic.c | 10 +++++----- tests/libmoduletestplugin_a.c | 6 +++--- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 496fae4f..d5e29ffa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-12-05 Matthias Clasen + + * glib/gatomic.c: In the ia64 implementation, use + __sync builtin without _si or _di suffix. (#321229, + Stanislav Brabec, patch by Andreas Schwab) + 2005-12-04 Behdad Esfahbod * glib/gslice.h: Remove comma at the end of enum. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 496fae4f..d5e29ffa 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-12-05 Matthias Clasen + + * glib/gatomic.c: In the ia64 implementation, use + __sync builtin without _si or _di suffix. (#321229, + Stanislav Brabec, patch by Andreas Schwab) + 2005-12-04 Behdad Esfahbod * glib/gslice.h: Remove comma at the end of enum. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 496fae4f..d5e29ffa 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2005-12-05 Matthias Clasen + + * glib/gatomic.c: In the ia64 implementation, use + __sync builtin without _si or _di suffix. (#321229, + Stanislav Brabec, patch by Andreas Schwab) + 2005-12-04 Behdad Esfahbod * glib/gslice.h: Remove comma at the end of enum. diff --git a/glib/gatomic.c b/glib/gatomic.c index 0d779058..7b191a6e 100644 --- a/glib/gatomic.c +++ b/glib/gatomic.c @@ -414,14 +414,14 @@ gint g_atomic_int_exchange_and_add (volatile gint *atomic, gint val) { - return __sync_fetch_and_add_si (atomic, val); + return __sync_fetch_and_add (atomic, val); } void g_atomic_int_add (volatile gint *atomic, gint val) { - __sync_fetch_and_add_si (atomic, val); + __sync_fetch_and_add (atomic, val); } gboolean @@ -429,7 +429,7 @@ g_atomic_int_compare_and_exchange (volatile gint *atomic, gint oldval, gint newval) { - return __sync_bool_compare_and_swap_si (atomic, oldval, newval); + return __sync_bool_compare_and_swap (atomic, oldval, newval); } gboolean @@ -437,8 +437,8 @@ g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic, gpointer oldval, gpointer newval) { - return __sync_bool_compare_and_swap_di ((long *)atomic, - (long)oldval, (long)newval); + return __sync_bool_compare_and_swap ((long *)atomic, + (long)oldval, (long)newval); } # define G_ATOMIC_MEMORY_BARRIER __sync_synchronize () diff --git a/tests/libmoduletestplugin_a.c b/tests/libmoduletestplugin_a.c index 5d9f5c0f..150d50d9 100644 --- a/tests/libmoduletestplugin_a.c +++ b/tests/libmoduletestplugin_a.c @@ -59,13 +59,13 @@ gplugin_say_boo_func (void) G_MODULE_EXPORT void gplugin_a_module_func (GModule *module) { - void (*f) (void) = NULL; + void *f = NULL; - if (!g_module_symbol (module, "gplugin_say_boo_func", (gpointer *) &f)) + if (!g_module_symbol (module, "gplugin_say_boo_func", &f )) { g_print ("error: %s\n", g_module_error ()); exit (1); } - f (); + ((void(*)(void)) f) (); } -- 2.34.1