From 3818a6404a4b413f35b008a24c98155ab3cfe2b4 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 27 Jul 2009 20:55:30 +0200 Subject: Compiler warning fixes (as part of bug #424078) --- addressbook/conduit/address-conduit.c | 2 +- calendar/gui/itip-utils.c | 4 ++-- e-util/e-pilot-map.c | 4 ++-- mail/em-folder-browser.c | 6 +++--- plugins/publish-calendar/url-editor-dialog.c | 2 +- widgets/misc/e-attachment.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 67bba341e7..172d45ee30 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -184,7 +184,7 @@ e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *cate retval = i; if (cat_to_add_len > 15) { - gchar tmpstr[16]; + gchar tmpstr[17]; strncpy(tmpstr, cat_to_add,16); tmpstr[16] = '\0'; /* Have to truncate the category name */ diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index a23146f118..1de0ed56d6 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -1341,8 +1341,8 @@ reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *comp = NULL; icalcomponent *top_level = NULL; GList *users = NULL; - gchar *from; - gchar *subject; + gchar *from = NULL; + gchar *subject = NULL; gchar *ical_string = NULL; gboolean retval = FALSE; diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c index 660bdedc9a..83517197fd 100644 --- a/e-util/e-pilot-map.c +++ b/e-util/e-pilot-map.c @@ -56,8 +56,8 @@ static void real_e_pilot_map_insert (EPilotMap *map, guint32 pid, const gchar *uid, gboolean archived, gboolean touch) { gchar *new_uid; - guint32 *new_pid; - EPilotMapPidNode *pnode; + guint32 *new_pid = NULL; + EPilotMapPidNode *pnode = NULL; EPilotMapUidNode *unode; g_return_if_fail (map != NULL); diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 5c939992ac..7a116e9ea5 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -351,10 +351,10 @@ generate_viewoption_menu (GtkWidget *emfv) g_object_set_data_full (G_OBJECT (menu_item), "LabelTag", g_strdup (strncmp (label->tag, "$Label", 6) == 0 ? label->tag + 6 : label->tag), g_free); - } - gtk_widget_show (menu_item); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item); + gtk_widget_show (menu_item); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item); + } } for (i = 0; temp_view_items[i].search.id != -1; ++i) { diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c index 7456d4b193..d4f6666772 100644 --- a/plugins/publish-calendar/url-editor-dialog.c +++ b/plugins/publish-calendar/url-editor-dialog.c @@ -42,7 +42,7 @@ create_uri (UrlEditorDialog *dialog) g_free (uri->location); uri->location = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->server_entry))); } else { - const gchar *method; + const gchar *method = "file"; gchar *server, *file, *port, *username, *password; server = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->server_entry))); diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index 7735be8872..39df9ad20b 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -2248,7 +2248,7 @@ attachment_save_new_candidate (SaveContext *save_context) GFile *candidate; GFileInfo *file_info; EAttachment *attachment; - const gchar *display_name; + const gchar *display_name = NULL; gchar *basename; attachment = save_context->attachment; -- cgit v1.2.3