From e05a96609d5f3c2725ab2a7a35438cd2c6aed8c2 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Fri, 5 Jul 2002 17:25:16 +0000 Subject: [PATCH] fix warning. (gtk_tree_view_search_iter): fix warning, #85884 Fri Jul 5 02:50:24 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning. (gtk_tree_view_search_iter): fix warning, #85884 * gtk/gtktreestore.c (gtk_tree_store_get_flags): change return value to GtkTreeModelFlags to fix compiler warning, #85883 * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change return value to GtkTreeModelFlags to fix compiler warning, #85882 * gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler warning, #85881 --- ChangeLog | 14 ++++++++++++++ ChangeLog.pre-2-10 | 14 ++++++++++++++ ChangeLog.pre-2-2 | 14 ++++++++++++++ ChangeLog.pre-2-4 | 14 ++++++++++++++ ChangeLog.pre-2-6 | 14 ++++++++++++++ ChangeLog.pre-2-8 | 14 ++++++++++++++ gtk/gtktreemodel.c | 6 +++++- gtk/gtktreemodelsort.c | 4 ++-- gtk/gtktreestore.c | 4 ++-- gtk/gtktreeview.c | 5 +---- 10 files changed, 94 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f449b79de6..a9b497cdb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Fri Jul 5 02:50:24 2002 Jonathan Blandford + + * gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning. + (gtk_tree_view_search_iter): fix warning, #85884 + + * gtk/gtktreestore.c (gtk_tree_store_get_flags): change return + value to GtkTreeModelFlags to fix compiler warning, #85883 + + * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change + return value to GtkTreeModelFlags to fix compiler warning, #85882 + + * gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler + warning, #85881 + Fri Jul 5 12:51:39 2002 Kristian Rietveld Merge from HEAD. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f449b79de6..a9b497cdb9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +Fri Jul 5 02:50:24 2002 Jonathan Blandford + + * gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning. + (gtk_tree_view_search_iter): fix warning, #85884 + + * gtk/gtktreestore.c (gtk_tree_store_get_flags): change return + value to GtkTreeModelFlags to fix compiler warning, #85883 + + * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change + return value to GtkTreeModelFlags to fix compiler warning, #85882 + + * gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler + warning, #85881 + Fri Jul 5 12:51:39 2002 Kristian Rietveld Merge from HEAD. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f449b79de6..a9b497cdb9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,17 @@ +Fri Jul 5 02:50:24 2002 Jonathan Blandford + + * gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning. + (gtk_tree_view_search_iter): fix warning, #85884 + + * gtk/gtktreestore.c (gtk_tree_store_get_flags): change return + value to GtkTreeModelFlags to fix compiler warning, #85883 + + * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change + return value to GtkTreeModelFlags to fix compiler warning, #85882 + + * gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler + warning, #85881 + Fri Jul 5 12:51:39 2002 Kristian Rietveld Merge from HEAD. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f449b79de6..a9b497cdb9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +Fri Jul 5 02:50:24 2002 Jonathan Blandford + + * gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning. + (gtk_tree_view_search_iter): fix warning, #85884 + + * gtk/gtktreestore.c (gtk_tree_store_get_flags): change return + value to GtkTreeModelFlags to fix compiler warning, #85883 + + * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change + return value to GtkTreeModelFlags to fix compiler warning, #85882 + + * gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler + warning, #85881 + Fri Jul 5 12:51:39 2002 Kristian Rietveld Merge from HEAD. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f449b79de6..a9b497cdb9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +Fri Jul 5 02:50:24 2002 Jonathan Blandford + + * gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning. + (gtk_tree_view_search_iter): fix warning, #85884 + + * gtk/gtktreestore.c (gtk_tree_store_get_flags): change return + value to GtkTreeModelFlags to fix compiler warning, #85883 + + * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change + return value to GtkTreeModelFlags to fix compiler warning, #85882 + + * gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler + warning, #85881 + Fri Jul 5 12:51:39 2002 Kristian Rietveld Merge from HEAD. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f449b79de6..a9b497cdb9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +Fri Jul 5 02:50:24 2002 Jonathan Blandford + + * gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning. + (gtk_tree_view_search_iter): fix warning, #85884 + + * gtk/gtktreestore.c (gtk_tree_store_get_flags): change return + value to GtkTreeModelFlags to fix compiler warning, #85883 + + * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change + return value to GtkTreeModelFlags to fix compiler warning, #85882 + + * gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler + warning, #85881 + Fri Jul 5 12:51:39 2002 Kristian Rietveld Merge from HEAD. diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c index e1b7030f7a..a749cec3da 100644 --- a/gtk/gtktreemodel.c +++ b/gtk/gtktreemodel.c @@ -284,7 +284,11 @@ void gtk_tree_path_prepend_index (GtkTreePath *path, gint index) { - gint *new_indices = g_new (gint, ++path->depth); + gint *new_indices; + + (path->depth)++; + new_indices = g_new (gint, path->depth); + if (path->indices == NULL) { path->indices = new_indices; diff --git a/gtk/gtktreemodelsort.c b/gtk/gtktreemodelsort.c index cc888a25f8..373edbb6b3 100644 --- a/gtk/gtktreemodelsort.c +++ b/gtk/gtktreemodelsort.c @@ -141,7 +141,7 @@ static void gtk_tree_model_sort_rows_reordered (GtkTreeModel *s_ gpointer data); /* TreeModel interface */ -static guint gtk_tree_model_sort_get_flags (GtkTreeModel *tree_model); +static GtkTreeModelFlags gtk_tree_model_sort_get_flags (GtkTreeModel *tree_model); static gint gtk_tree_model_sort_get_n_columns (GtkTreeModel *tree_model); static GType gtk_tree_model_sort_get_column_type (GtkTreeModel *tree_model, gint index); @@ -829,7 +829,7 @@ gtk_tree_model_sort_rows_reordered (GtkTreeModel *s_model, } /* Fulfill our model requirements */ -static guint +static GtkTreeModelFlags gtk_tree_model_sort_get_flags (GtkTreeModel *tree_model) { g_return_val_if_fail (GTK_IS_TREE_MODEL_SORT (tree_model), 0); diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c index e26f1fa41f..14c8e5a2c0 100644 --- a/gtk/gtktreestore.c +++ b/gtk/gtktreestore.c @@ -35,7 +35,7 @@ static void gtk_tree_store_drag_source_init(GtkTreeDragSourceIface *ifac static void gtk_tree_store_drag_dest_init (GtkTreeDragDestIface *iface); static void gtk_tree_store_sortable_init (GtkTreeSortableIface *iface); static void gtk_tree_store_finalize (GObject *object); -static guint gtk_tree_store_get_flags (GtkTreeModel *tree_model); +static GtkTreeModelFlags gtk_tree_store_get_flags (GtkTreeModel *tree_model); static gint gtk_tree_store_get_n_columns (GtkTreeModel *tree_model); static GType gtk_tree_store_get_column_type (GtkTreeModel *tree_model, gint index); @@ -467,7 +467,7 @@ gtk_tree_store_finalize (GObject *object) */ -static guint +static GtkTreeModelFlags gtk_tree_store_get_flags (GtkTreeModel *tree_model) { g_return_val_if_fail (GTK_IS_TREE_STORE (tree_model), 0); diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 6343223ef1..afd7d0b0d4 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -8816,7 +8816,7 @@ gtk_tree_view_collapse_all (GtkTreeView *tree_view) GtkRBTree *tree; GtkRBNode *node; GtkTreePath *path; - guint *indices; + gint *indices; g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); @@ -10773,9 +10773,6 @@ gtk_tree_view_search_iter (GtkTreeModel *model, } while (1); - if (path) - gtk_tree_path_free (path); - return FALSE; }