aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/memo-page.c
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2011-02-09 00:57:50 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:31 +0800
commit8efc1bc6f91e06ca61b00eb8119c9c36697e43a6 (patch)
tree95ec3e7ac41deec84bfd02de6ee05faf245b3dea /calendar/gui/dialogs/memo-page.c
parentbe15d6730130da3f9e2fa6579233d5a9b304a7ea (diff)
downloadgsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.tar
gsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.tar.gz
gsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.tar.bz2
gsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.tar.lz
gsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.tar.xz
gsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.tar.zst
gsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.zip
Bug 641756 - Fix warnings from GCC 4.6
GCC learned how to find dead assignments.
Diffstat (limited to 'calendar/gui/dialogs/memo-page.c')
-rw-r--r--calendar/gui/dialogs/memo-page.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 414b644d0c..03cf7e7b95 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -639,40 +639,26 @@ memo_page_fill_component (CompEditorPage *page,
e_cal_component_set_description_list (comp, NULL);
}
else {
- gint idxToUse = 1;
GSList l;
- ECalComponentText text, sumText;
- gchar *txt, *p;
+ ECalComponentText text;
+ gchar *p;
gunichar uc;
for (i = 0, p = str, uc = g_utf8_get_char_validated (p, -1);
i < 50 && p && uc < (gunichar)-2;
i++, p = g_utf8_next_char (p), uc = g_utf8_get_char_validated (p, -1)) {
- idxToUse = p - str;
if (uc == '\n' || !uc) {
p = NULL;
break;
}
}
- if (p)
- idxToUse = p - str;
-
- if (i == 50 && uc && uc < (gunichar)-2)
- sumText.value = txt = g_strdup_printf ("%.*s...", idxToUse, str);
- else
- sumText.value = txt = g_strndup (str, idxToUse);
-
- sumText.altrep = NULL;
-
text.value = str;
text.altrep = NULL;
l.data = &text;
l.next = NULL;
e_cal_component_set_description_list (comp, &l);
-
- g_free (txt);
}
if (str)