Remove some unused code. Same here And here Mark some functions static.
authorKjartan Maraas <kmaraas@gnome.org>
Thu, 8 Sep 2005 06:35:44 +0000 (06:35 +0000)
committerKjartan Maraas <kmaraas@src.gnome.org>
Thu, 8 Sep 2005 06:35:44 +0000 (06:35 +0000)
2005-09-08  Kjartan Maraas  <kmaraas@gnome.org>

* 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
gobject/gclosure.c
gobject/gsignal.c
gobject/gtype.c
gobject/testgobject.c

index dd3c2af..8cb2337 100644 (file)
@@ -1,3 +1,11 @@
+2005-09-08  Kjartan Maraas  <kmaraas@gnome.org>
+
+       * 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  <mclasen@redhat.com>
 
        * gsignal.c (struct _SignalNode): Make the name field const.
index 7097075..9163709 100644 (file)
@@ -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)
index a637e8e..50eebdd 100644 (file)
@@ -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))
index 8cd2350..5fe73bc 100644 (file)
@@ -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))
index 16c4cc1..2723764 100644 (file)
@@ -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;