aboutsummaryrefslogtreecommitdiffstats
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
parent2def4a73864c87c4dee25b04180c882e72a0fee1 (diff)
downloadgsoc2013-evolution-4c56856e05c6ab1468fe8ace4b73ac31b333990b.tar.gz
gsoc2013-evolution-4c56856e05c6ab1468fe8ace4b73ac31b333990b.tar.zst
gsoc2013-evolution-4c56856e05c6ab1468fe8ace4b73ac31b333990b.zip
Fix few 'may be used uninitialized' compiler warnings
-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
-rw-r--r--calendar/gui/dialogs/comp-editor.c4
-rw-r--r--calendar/gui/e-day-view-main-item.c2
-rw-r--r--mail/e-mail-store.c2
-rw-r--r--mail/mail-ops.c2
-rw-r--r--mail/message-list.c2
-rw-r--r--widgets/table/e-table-group-container.c5
-rw-r--r--widgets/text/e-reflow.c2
11 files changed, 16 insertions, 16 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;
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 9a60f6d382..9c463c66dc 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -3010,8 +3010,8 @@ attachment_loaded_cb (EAttachment *attachment,
{
GFileInfo *file_info;
const gchar *display_name;
- const gchar *new_name;
const gchar *uid;
+ gchar *new_name;
/* Prior to 2.27.2, attachment files were named:
*
@@ -3042,7 +3042,7 @@ attachment_loaded_cb (EAttachment *attachment,
uid = g_object_get_data (G_OBJECT (attachment), "uid");
if (g_str_has_prefix (display_name, uid)) {
- new_name = g_strdup (display_name+strlen(uid)+1);
+ new_name = g_strdup (display_name + strlen (uid) + 1);
g_file_info_set_display_name (file_info, new_name);
g_object_notify (G_OBJECT (attachment), "file-info");
g_free (new_name);
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index c379f2aecb..b6cdc967e7 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -185,7 +185,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
gint item_x, item_y, item_w, item_h, bar_y1, bar_y2;
GdkColor bg_color;
ECalComponent *comp;
- gint num_icons, icon_x, icon_y, icon_x_inc = 0, icon_y_inc = 0;
+ gint num_icons, icon_x = 0, icon_y, icon_x_inc = 0, icon_y_inc = 0;
gint max_icon_w, max_icon_h;
gboolean draw_reminder_icon, draw_recurrence_icon, draw_timezone_icon, draw_meeting_icon;
gboolean draw_attach_icon;
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c
index 885e34bc6b..e59e7b2abd 100644
--- a/mail/e-mail-store.c
+++ b/mail/e-mail-store.c
@@ -311,7 +311,7 @@ e_mail_store_add_by_account (EMailBackend *backend,
CamelService *service = NULL;
CamelProvider *provider;
CamelURL *url;
- gboolean skip, transport_only;
+ gboolean skip = FALSE, transport_only;
GError *error = NULL;
g_return_val_if_fail (E_IS_MAIL_BACKEND (backend), NULL);
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 0ff745e413..57885172a9 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -215,7 +215,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
CamelFolder *folder = NULL;
CamelURL *url;
const gchar *uid;
- gboolean is_local_delivery;
+ gboolean is_local_delivery = FALSE;
gint i;
fm->destination = e_mail_local_get_folder (
diff --git a/mail/message-list.c b/mail/message-list.c
index 602bdfa4dd..1e903a3f48 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4125,7 +4125,7 @@ on_click (ETree *tree,
CamelMessageInfo *info;
gboolean folder_is_trash;
const gchar *uid;
- gint flag;
+ gint flag = 0;
guint32 flags;
if (col == COL_MESSAGE_STATUS)
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index d874834db1..7d04eda9d9 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -1252,7 +1252,7 @@ e_table_group_container_print_page (EPrintable *ep,
gboolean quantize,
ETGCPrintContext *groupcontext)
{
- cairo_t *cr;
+ cairo_t *cr = NULL;
GtkPageSetup *setup;
gdouble yd;
gdouble page_height, page_margin;
@@ -1301,8 +1301,7 @@ e_table_group_container_print_page (EPrintable *ep,
child_height = e_printable_height (child_printable, context, width,yd, quantize);
if (child_height < 0)
child_height = -child_height;
- if (yd < 2 * TEXT_AREA_HEIGHT + 20 + child_height )
- {
+ if (cr && yd < 2 * TEXT_AREA_HEIGHT + 20 + child_height) {
cairo_show_page (cr);
cairo_translate (cr, -2 * TEXT_AREA_HEIGHT, -TEXT_AREA_HEIGHT);
break;
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index 37cfef1e1b..296d732590 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -1398,7 +1398,7 @@ e_reflow_point (GnomeCanvasItem *item,
gint cx,
gint cy)
{
- GnomeCanvasItem *child;
+ GnomeCanvasItem *child = NULL;
if (GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->point)
child = GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->point (item, x, y, cx, cy);