aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-popup.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-popup.c')
-rw-r--r--mail/em-popup.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mail/em-popup.c b/mail/em-popup.c
index d2b2ca1e6e..a7d8a90179 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -760,7 +760,9 @@ emp_standard_menu_factory(EMPopup *emp, EMPopupTarget *target, void *data)
/* FIXME: use the snoop_part stuff from em-format.c */
if (apps == NULL && strcmp(target->data.part.mime_type, "application/octet-stream") == 0) {
- const char *filename = camel_mime_part_get_filename(target->data.part.part), *name_type;
+ const char *filename, *name_type;
+
+ filename = camel_mime_part_get_filename(target->data.part.part);
if (filename) {
/* GNOME-VFS will misidentify TNEF attachments as MPEG */
@@ -780,7 +782,7 @@ emp_standard_menu_factory(EMPopup *emp, EMPopupTarget *target, void *data)
menus = g_slist_prepend(menus, (void *)&emp_standard_part_apps_bar);
- for (l=apps;l;l=l->next) {
+ for (l = apps, i = 0; l; l = l->next, i++) {
GnomeVFSMimeApplication *app = l->data;
struct _open_in_item *item;
@@ -809,6 +811,10 @@ emp_standard_menu_factory(EMPopup *emp, EMPopupTarget *target, void *data)
items = emp_standard_object_popups;
len = LEN(emp_standard_object_popups);
break; }
+ default:
+ items = NULL;
+ len = 0;
+ g_assert_not_reached ();
}
for (i=0;i<len;i++) {