From 4c56856e05c6ab1468fe8ace4b73ac31b333990b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 30 Sep 2011 15:39:57 +0200 Subject: Fix few 'may be used uninitialized' compiler warnings --- addressbook/gui/contact-list-editor/e-contact-list-editor.c | 2 +- addressbook/gui/contact-list-editor/e-contact-list-model.c | 6 ++++-- addressbook/gui/widgets/eab-gui-util.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index d6a373ad38..57d2acde99 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -780,7 +780,7 @@ contact_list_editor_remove_button_clicked_cb (GtkWidget *widget) { EContactListEditor *editor; GtkTreeSelection *selection; - GtkTreeRowReference *new_selection; + GtkTreeRowReference *new_selection = NULL; GtkTreeModel *model; GtkTreeView *view; GtkTreePath *path; diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c index 6774eee3b7..8236bafea4 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-model.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c @@ -144,7 +144,7 @@ e_contact_list_model_add_destination (EContactListModel *model, gboolean ignore_conflicts) { GtkTreeIter iter; - GtkTreePath *path; + GtkTreePath *path = NULL; g_return_val_if_fail (E_IS_CONTACT_LIST_MODEL (model), NULL); g_return_val_if_fail (E_IS_DESTINATION (destination), NULL); @@ -160,8 +160,10 @@ e_contact_list_model_add_destination (EContactListModel *model, for (dest = dests; dest; dest = dest->next) { path = e_contact_list_model_add_destination (model, dest->data, &iter, ignore_conflicts); - if (dest->next && path) + if (dest->next && path) { gtk_tree_path_free (path); + path = NULL; + } } /* When the list has no children the remove it. We don't want empty sublists displayed. */ diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 00f4e884c7..6994af2b88 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -735,7 +735,7 @@ country_to_ISO (const gchar *country) } while (fgets (buffer, length, file) != NULL) { - gchar *low; + gchar *low = NULL; pair = g_strsplit (buffer, "\t", 2); if (pair[0]) { -- cgit v1.2.3