aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-09-30 21:39:57 +0800
committerMilan Crha <mcrha@redhat.com>2011-09-30 21:39:57 +0800
commit4c56856e05c6ab1468fe8ace4b73ac31b333990b (patch)
tree98304dd391494a7f9cc1aecebb99fe3b0f328377 /addressbook
parent2def4a73864c87c4dee25b04180c882e72a0fee1 (diff)
downloadgsoc2013-evolution-4c56856e05c6ab1468fe8ace4b73ac31b333990b.tar.gz
gsoc2013-evolution-4c56856e05c6ab1468fe8ace4b73ac31b333990b.tar.zst
gsoc2013-evolution-4c56856e05c6ab1468fe8ace4b73ac31b333990b.zip
Fix few 'may be used uninitialized' compiler warnings
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c2
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.c6
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c2
-rw-r--r--addressbook/importers/evolution-vcard-importer.c3
4 files changed, 7 insertions, 6 deletions
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]) {
diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c
index be97f25c98..b35553943e 100644
--- a/addressbook/importers/evolution-vcard-importer.c
+++ b/addressbook/importers/evolution-vcard-importer.c
@@ -351,8 +351,7 @@ guess_vcard_encoding (const gchar *filename)
return VCARD_ENCODING_NONE;
}
- fgets (line, 4096, handle);
- if (line == NULL) {
+ if (fgets (line, 4096, handle) == NULL) {
fclose (handle);
g_print ("\n");
return VCARD_ENCODING_NONE;