From 2147c486b0afb90ea32fdce9fefedcbebc2375a6 Mon Sep 17 00:00:00 2001 From: Kjartan Maraas Date: Thu, 8 Sep 2005 06:35:44 +0000 Subject: [PATCH] Remove some unused code. Same here And here Mark some functions static. 2005-09-08 Kjartan Maraas * gclosure.c: (g_closure_set_meta_marshal): Remove some unused code. * gsignal.c: (g_signal_emitv): Same here * gtype.c: (g_type_register_fundamental): And here * testgobject.c: Mark some functions static. --- gobject/ChangeLog | 8 ++++++++ gobject/gclosure.c | 2 -- gobject/gsignal.c | 6 ++++-- gobject/gtype.c | 2 -- gobject/testgobject.c | 6 +++--- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/gobject/ChangeLog b/gobject/ChangeLog index dd3c2af91..8cb233797 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,11 @@ +2005-09-08 Kjartan Maraas + + * gclosure.c: (g_closure_set_meta_marshal): Remove some unused + code. + * gsignal.c: (g_signal_emitv): Same here + * gtype.c: (g_type_register_fundamental): And here + * testgobject.c: Mark some functions static. + 2005-09-05 Matthias Clasen * gsignal.c (struct _SignalNode): Make the name field const. diff --git a/gobject/gclosure.c b/gobject/gclosure.c index 7097075ed..91637099d 100644 --- a/gobject/gclosure.c +++ b/gobject/gclosure.c @@ -196,7 +196,6 @@ g_closure_set_meta_marshal (GClosure *closure, GClosureMarshal meta_marshal) { GClosureNotifyData *notifiers; - guint n; g_return_if_fail (closure != NULL); g_return_if_fail (meta_marshal != NULL); @@ -204,7 +203,6 @@ g_closure_set_meta_marshal (GClosure *closure, g_return_if_fail (closure->in_marshal == FALSE); g_return_if_fail (closure->meta_marshal == 0); - n = CLOSURE_N_NOTIFIERS (closure); notifiers = closure->notifiers; closure->notifiers = g_renew (GClosureNotifyData, NULL, CLOSURE_N_NOTIFIERS (closure) + 1); if (notifiers) diff --git a/gobject/gsignal.c b/gobject/gsignal.c index a637e8e60..50eebdd75 100644 --- a/gobject/gsignal.c +++ b/gobject/gsignal.c @@ -2079,10 +2079,10 @@ g_signal_emitv (const GValue *instance_and_params, GQuark detail, GValue *return_value) { - const GValue *param_values; gpointer instance; SignalNode *node; #ifdef G_ENABLE_DEBUG + const GValue *param_values; guint i; #endif @@ -2091,8 +2091,10 @@ g_signal_emitv (const GValue *instance_and_params, g_return_if_fail (G_TYPE_CHECK_INSTANCE (instance)); g_return_if_fail (signal_id > 0); +#ifdef G_ENABLE_DEBUG param_values = instance_and_params + 1; - +#endif + SIGNAL_LOCK (); node = LOOKUP_SIGNAL_NODE (signal_id); if (!node || !g_type_is_a (G_TYPE_FROM_INSTANCE (instance), node->itype)) diff --git a/gobject/gtype.c b/gobject/gtype.c index 8cd235033..5fe73bc3d 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -2195,7 +2195,6 @@ g_type_register_fundamental (GType type_id, const GTypeFundamentalInfo *finfo, GTypeFlags flags) { - GTypeFundamentalInfo *node_finfo; TypeNode *node; g_return_val_if_uninitialized (static_quark_type_flags, g_type_init, 0); @@ -2231,7 +2230,6 @@ g_type_register_fundamental (GType type_id, G_WRITE_LOCK (&type_rw_lock); node = type_node_fundamental_new_W (type_id, type_name, finfo->type_flags); - node_finfo = type_node_fundamental_info_I (node); type_add_flags_W (node, flags); if (check_type_info_I (NULL, NODE_FUNDAMENTAL_TYPE (node), type_name, info)) diff --git a/gobject/testgobject.c b/gobject/testgobject.c index 16c4cc15a..27237641b 100644 --- a/gobject/testgobject.c +++ b/gobject/testgobject.c @@ -40,7 +40,7 @@ static void iface_base_init (TestIfaceClass *iface); static void iface_base_finalize (TestIfaceClass *iface); static void print_foo (TestIface *tiobj, const gchar *string); -GType +static GType test_iface_get_type (void) { static GType test_iface_type = 0; @@ -103,7 +103,7 @@ test_object_test_iface_init (gpointer giface, /* initialize stuff */ iface->print_string = print_foo; } -void +static void iface_print_string (TestIface *tiobj, const gchar *string) { @@ -156,7 +156,7 @@ static gboolean test_signal_accumulator (GSignalInvocationHint *ihint, static gchar* test_object_test_signal (TestObject *tobject, TestIface *iface_object, gpointer tdata); -GType +static GType test_object_get_type (void) { static GType test_object_type = 0;