From: Matthias Clasen Date: Mon, 28 Nov 2005 18:31:03 +0000 (+0000) Subject: Silence compiler warnings. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=09b118f462fabb228ba26a498001f7c4e72bdde8;p=dana%2Fcg-glib.git Silence compiler warnings. 2005-11-28 Matthias Clasen * glib/gthread.c (g_static_rw_lock_wait, g_static_rw_lock_signal): * glib/gnode.c (g_node_depth_traverse_level): * glib/gmem.c (g_allocator_new): * glib/ghash.c (g_hash_table_unref, g_hash_table_destroy) (g_hash_table_foreach_remove_or_steal): Silence compiler warnings. --- diff --git a/ChangeLog b/ChangeLog index e8f9a2fa..45dec332 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-11-28 Matthias Clasen + + * glib/gthread.c (g_static_rw_lock_wait, g_static_rw_lock_signal): + * glib/gnode.c (g_node_depth_traverse_level): + * glib/gmem.c (g_allocator_new): + * glib/ghash.c (g_hash_table_unref, g_hash_table_destroy) + (g_hash_table_foreach_remove_or_steal): Silence compiler + warnings. + 2005-11-27 Matthias Clasen * glib/gunicollate.c (g_utf8_collate_key_for_filename): @@ -6,7 +15,7 @@ Wed Nov 23 17:34:01 2005 Tim Janik * glib/gdataset.c: access datalist flags via atomic pointer access - funcitons, instead of acquiring the dataset lock. this is faster and + functions, instead of acquiring the dataset lock. this is faster and also matches the atomic pointer readouts in gdatalistprivate.h and direct pointer modifications required by gobject.c. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e8f9a2fa..45dec332 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2005-11-28 Matthias Clasen + + * glib/gthread.c (g_static_rw_lock_wait, g_static_rw_lock_signal): + * glib/gnode.c (g_node_depth_traverse_level): + * glib/gmem.c (g_allocator_new): + * glib/ghash.c (g_hash_table_unref, g_hash_table_destroy) + (g_hash_table_foreach_remove_or_steal): Silence compiler + warnings. + 2005-11-27 Matthias Clasen * glib/gunicollate.c (g_utf8_collate_key_for_filename): @@ -6,7 +15,7 @@ Wed Nov 23 17:34:01 2005 Tim Janik * glib/gdataset.c: access datalist flags via atomic pointer access - funcitons, instead of acquiring the dataset lock. this is faster and + functions, instead of acquiring the dataset lock. this is faster and also matches the atomic pointer readouts in gdatalistprivate.h and direct pointer modifications required by gobject.c. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index e8f9a2fa..45dec332 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,12 @@ +2005-11-28 Matthias Clasen + + * glib/gthread.c (g_static_rw_lock_wait, g_static_rw_lock_signal): + * glib/gnode.c (g_node_depth_traverse_level): + * glib/gmem.c (g_allocator_new): + * glib/ghash.c (g_hash_table_unref, g_hash_table_destroy) + (g_hash_table_foreach_remove_or_steal): Silence compiler + warnings. + 2005-11-27 Matthias Clasen * glib/gunicollate.c (g_utf8_collate_key_for_filename): @@ -6,7 +15,7 @@ Wed Nov 23 17:34:01 2005 Tim Janik * glib/gdataset.c: access datalist flags via atomic pointer access - funcitons, instead of acquiring the dataset lock. this is faster and + functions, instead of acquiring the dataset lock. this is faster and also matches the atomic pointer readouts in gdatalistprivate.h and direct pointer modifications required by gobject.c. diff --git a/glib/ghash.c b/glib/ghash.c index 32aad3a8..77badb49 100644 --- a/glib/ghash.c +++ b/glib/ghash.c @@ -190,7 +190,8 @@ g_hash_table_unref (GHashTable *hash_table) if (g_atomic_int_exchange_and_add (&hash_table->ref_count, -1) - 1 == 0) { - guint i; + gint i; + for (i = 0; i < hash_table->size; i++) g_hash_nodes_destroy (hash_table->nodes[i], hash_table->key_destroy_func, @@ -214,7 +215,7 @@ g_hash_table_unref (GHashTable *hash_table) void g_hash_table_destroy (GHashTable *hash_table) { - guint i; + gint i; g_return_if_fail (hash_table != NULL); g_return_if_fail (hash_table->ref_count > 0); @@ -542,7 +543,7 @@ g_hash_table_foreach_remove_or_steal (GHashTable *hash_table, gboolean notify) { GHashNode *node, *prev; - guint i; + gint i; guint deleted = 0; for (i = 0; i < hash_table->size; i++) diff --git a/glib/gmem.c b/glib/gmem.c index 37629651..68de9057 100644 --- a/glib/gmem.c +++ b/glib/gmem.c @@ -1265,20 +1265,22 @@ void g_blow_chunks (void) {} #endif /* DISABLE_MEM_POOLS */ +struct _GAllocator +{ + gchar *name; + guint16 n_preallocs; + guint is_unused : 1; + guint type : 4; + GAllocator *last; + GMemChunk *mem_chunk; + gpointer free_list; +}; GAllocator* g_allocator_new (const gchar *name, guint n_preallocs) { - static const struct _GAllocator { - gchar *name; - guint16 n_preallocs; - guint is_unused : 1; - guint type : 4; - GAllocator *last; - GMemChunk *mem_chunk; - gpointer free_list; - } dummy = { + static const GAllocator dummy = { "GAllocator is deprecated", 1, TRUE, 0, NULL, NULL, NULL, }; /* some (broken) GAllocator uses depend on non-NULL allocators */ diff --git a/glib/gnode.c b/glib/gnode.c index c9c5bcb9..747545dd 100644 --- a/glib/gnode.c +++ b/glib/gnode.c @@ -614,7 +614,7 @@ g_node_depth_traverse_level (GNode *node, GNodeTraverseFunc func, gpointer data) { - gint level; + guint level; gboolean more_levels; level = 0; diff --git a/glib/gthread.c b/glib/gthread.c index 17cee7f7..1beca52e 100644 --- a/glib/gthread.c +++ b/glib/gthread.c @@ -730,7 +730,7 @@ g_static_rw_lock_init (GStaticRWLock* lock) *lock = init_lock; } -static void inline +inline static void g_static_rw_lock_wait (GCond** cond, GStaticMutex* mutex) { if (!*cond) @@ -738,7 +738,7 @@ g_static_rw_lock_wait (GCond** cond, GStaticMutex* mutex) g_cond_wait (*cond, g_static_mutex_get_mutex (mutex)); } -static void inline +inline static void g_static_rw_lock_signal (GStaticRWLock* lock) { if (lock->want_to_write && lock->write_cond)