[libdazzle] util: avoid warnings from gvalue and treemodel
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] util: avoid warnings from gvalue and treemodel
- Date: Wed, 5 Jul 2017 03:57:18 +0000 (UTC)
commit 6b4edbf3c245f074d314767071f3fbe232b3b5e7
Author: Christian Hergert <chergert redhat com>
Date: Tue Jul 4 20:57:06 2017 -0700
util: avoid warnings from gvalue and treemodel
src/util/dzl-gtk.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/util/dzl-gtk.c b/src/util/dzl-gtk.c
index f0b7920..87c6fce 100644
--- a/src/util/dzl-gtk.c
+++ b/src/util/dzl-gtk.c
@@ -473,7 +473,7 @@ dzl_gtk_list_store_insert_sorted (GtkListStore *store,
GCompareDataFunc compare_func,
gpointer compare_data)
{
- g_auto(GValue) value = G_VALUE_INIT;
+ GValue value = G_VALUE_INIT;
gpointer (*get_func) (const GValue *) = NULL;
GtkTreeModel *model = (GtkTreeModel *)store;
GType type;
@@ -504,8 +504,6 @@ dzl_gtk_list_store_insert_sorted (GtkListStore *store,
return;
}
- g_value_init (&value, type);
-
cmpval = 1;
left = 0;
middle = 0;
@@ -524,7 +522,7 @@ dzl_gtk_list_store_insert_sorted (GtkListStore *store,
cmpval = compare_func (get_func (&value), key, compare_data);
- g_value_reset (&value);
+ g_value_unset (&value);
if (cmpval < 0)
left = middle + 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]