[gtk+] tests: Fix a bunch of set-but-unused warnings in the filtermodel test



commit 61d6c73f186a08cd55852c0a44a1704a6fbbbc39
Author: Benjamin Otte <otte redhat com>
Date:   Thu Sep 29 12:31:43 2011 +0200

    tests: Fix a bunch of set-but-unused warnings in the filtermodel test
    
    The whole test doesn't seem to unref any memoery, somebody should review
    it.

 gtk/tests/filtermodel.c |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/gtk/tests/filtermodel.c b/gtk/tests/filtermodel.c
index 7684731..9abfe34 100644
--- a/gtk/tests/filtermodel.c
+++ b/gtk/tests/filtermodel.c
@@ -2420,6 +2420,10 @@ insert_before (void)
 
   signal_monitor_assert_is_empty (monitor);
   check_level_length (GTK_TREE_MODEL_FILTER (filter), NULL, 3);
+
+  g_object_unref (filter);
+  g_object_unref (store);
+  g_object_unref (tree_view);
 }
 
 static void
@@ -2479,6 +2483,10 @@ insert_child (void)
 
   signal_monitor_assert_is_empty (monitor);
   check_level_length (GTK_TREE_MODEL_FILTER (filter), NULL, 1);
+
+  g_object_unref (filter);
+  g_object_unref (store);
+  g_object_unref (tree_view);
 }
 
 
@@ -5003,6 +5011,10 @@ specific_has_child_filter (void)
   set_path_visibility (&fixture, "0", FALSE);
   /* check_filter_model (&fixture); */
   signal_monitor_assert_is_empty (fixture.monitor);
+
+  g_object_unref (fixture.filter);
+  g_object_unref (fixture.store);
+  g_object_unref (tree_view);
 }
 
 
@@ -5163,6 +5175,10 @@ specific_root_has_child_filter (void)
   set_path_visibility (&fixture, "0", FALSE);
   /* check_filter_model (&fixture); */
   signal_monitor_assert_is_empty (fixture.monitor);
+
+  g_object_unref (fixture.filter);
+  g_object_unref (fixture.store);
+  g_object_unref (tree_view);
 }
 
 static void
@@ -5269,6 +5285,10 @@ specific_has_child_filter_on_sort_model (void)
   set_path_visibility (&fixture, "0", FALSE);
   /* check_filter_model (&fixture); */
   signal_monitor_assert_is_empty (fixture.monitor);
+
+  g_object_unref (fixture.filter);
+  g_object_unref (fixture.store);
+  g_object_unref (tree_view);
 }
 
 static gboolean
@@ -5386,11 +5406,16 @@ specific_at_least_2_children_filter (void)
   set_path_visibility (&fixture, "0", FALSE);
   /* check_filter_model (&fixture); */
   signal_monitor_assert_is_empty (fixture.monitor);
+
+  g_object_unref (fixture.filter);
+  g_object_unref (fixture.store);
+  g_object_unref (tree_view);
 }
 
 static void
 specific_at_least_2_children_filter_on_sort_model (void)
 {
+  GtkTreeRowReference *ref;
   GtkTreeModel *filter;
   GtkTreeModel *sort_model;
   GtkTreeIter iter, root;
@@ -5427,7 +5452,6 @@ specific_at_least_2_children_filter_on_sort_model (void)
 
     {
       GtkTreePath *path = gtk_tree_path_new_from_indices (0, 0, -1);
-      GtkTreeRowReference *ref;
 
       ref = gtk_tree_row_reference_new (sort_model, path);
       gtk_tree_path_free (path);
@@ -5462,6 +5486,11 @@ specific_at_least_2_children_filter_on_sort_model (void)
   gtk_tree_store_append (fixture.store, &root, NULL);
   check_level_length (fixture.filter, NULL, 1);
   signal_monitor_assert_is_empty (fixture.monitor);
+
+  gtk_tree_row_reference_free (ref);
+  g_object_unref (fixture.filter);
+  g_object_unref (fixture.store);
+  g_object_unref (tree_view);
 }
 
 
@@ -6568,6 +6597,9 @@ specific_bug_658696 (void)
 
   /* This used to cause a crash in gtk_tree_model_filter_check_ancestors() */
   gtk_tree_store_append (store, &iter, NULL);
+
+  g_object_unref (store);
+  g_object_unref (filter);
 }
 
 /* main */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]