From e86a94310a715ec7c300145cbd58ef9ac93389b0 Mon Sep 17 00:00:00 2001 From: Kjartan Maraas Date: Sun, 1 Oct 2006 11:55:39 +0000 Subject: Remove duplicate include. Fix some compiler warnings. Cast away a compiler 2006-10-01 Kjartan Maraas * gui/component/addressbook-component.c: Remove duplicate include. * gui/contact-editor/e-contact-editor.c: (extract_simple_field): Fix some compiler warnings. * gui/contact-editor/e-contact-quick-add.c: (build_quick_add_dialog): Cast away a compiler warning. * gui/widgets/e-addressbook-view.c: (generate_viewoption_menu): #if 0 out an unused array, fix 0 vs NULL initialization in some other arrays and remove an unused GSList. * gui/widgets/e-minicard.c: (add_email_field): Make a var const. * gui/widgets/eab-gui-util.c: (eab_contact_save), (eab_contact_list_save): Add some casts to fix compiler warnings and #if 0 out an unused function. * util/eab-book-util.c: (escape), (eab_contact_list_from_string): Some GString fixes. All of this from bug #332101. svn path=/trunk/; revision=32841 --- addressbook/util/eab-book-util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'addressbook/util/eab-book-util.c') diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c index a463d43480..fb81399b4e 100644 --- a/addressbook/util/eab-book-util.c +++ b/addressbook/util/eab-book-util.c @@ -53,14 +53,14 @@ eab_get_config_database () static char* escape (const char *str) { - GString *s = g_string_new (""); + GString *s = g_string_new (NULL); const char *p = str; while (*p) { if (*p == '\\') - g_string_append (s, "\\\\"); + g_string_append_len (s, "\\\\", 2); else if (*p == '"') - g_string_append (s, "\\\""); + g_string_append_len (s, "\\\"", 2); else g_string_append_c (s, *p); @@ -208,7 +208,7 @@ GList* eab_contact_list_from_string (const char *str) { GList *contacts = NULL; - GString *gstr = g_string_new (""); + GString *gstr = g_string_new (NULL); char *str_stripped; char *p = (char*)str; char *q; -- cgit v1.2.3