From 88a914e0e874ece8e1aa2267256cc55d2bc54025 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 1 Nov 2007 11:26:50 +0000 Subject: ** Miscellaneous compiler warning fixes. 2007-11-01 Matthew Barnes ** Miscellaneous compiler warning fixes. * composer/e-msg-composer.c (e_msg_composer_set_body_text): * shell/e-user-creatable-items-handler.c (ensure_menu_items): Don't compare a character pointer to a string literal. * widgets/table/e-table-click-to-add.c (etcta_add_message): Fix a const warning. svn path=/trunk/; revision=34476 --- composer/ChangeLog | 5 +++++ composer/e-msg-composer.c | 3 ++- shell/ChangeLog | 5 +++++ shell/e-user-creatable-items-handler.c | 2 +- widgets/table/ChangeLog | 5 +++++ widgets/table/e-table-click-to-add.c | 4 ++-- 6 files changed, 20 insertions(+), 4 deletions(-) diff --git a/composer/ChangeLog b/composer/ChangeLog index fd5e6c586d..f848a1c8eb 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2007-11-01 Matthew Barnes + + * e-msg-composer.c (e_msg_composer_set_body_text): + Don't compare a character pointer to a string literal. + 2007-10-31 Kjartan Maraas * e-msg-composer.c: Remove one more unused header. diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index fab4a57b8b..314f7f8ebf 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -5100,8 +5100,9 @@ void e_msg_composer_set_body_text (EMsgComposer *composer, const char *text, ssize_t len) { g_return_if_fail (E_IS_MSG_COMPOSER (composer)); + g_return_if_fail (text != NULL); - set_editor_text (composer, text, len, TRUE, text == ""); + set_editor_text (composer, text, len, TRUE, *text == '\0'); } /** diff --git a/shell/ChangeLog b/shell/ChangeLog index acb070740a..5255bd5f83 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2007-11-01 Matthew Barnes + + * e-user-creatable-items-handler.c (ensure_menu_items): + Don't compare a character pointer to a string literal. + 2007-10-29 Srinivasa Ragavan * GNOME_Evolution_Shell.server.in.in: Remove the version. diff --git a/shell/e-user-creatable-items-handler.c b/shell/e-user-creatable-items-handler.c index 0ed012ea69..b367113683 100644 --- a/shell/e-user-creatable-items-handler.c +++ b/shell/e-user-creatable-items-handler.c @@ -265,7 +265,7 @@ ensure_menu_items (EUserCreatableItemsHandler *handler) && strcmp (corba_item->id, "message") == 0) default_verb = item->verb; - if (corba_item->iconName == "") { + if (corba_item->iconName == NULL || *corba_item->iconName == '\0') { item->icon = NULL; } else { item->icon = e_icon_factory_get_icon (corba_item->iconName, E_ICON_SIZE_MENU); diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index f439d17d7b..6f412a8816 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,8 @@ +2007-11-01 Matthew Barnes + + * e-table-click-to-add.c (etcta_add_message): + Fix a const warning. + 2007-10-26 Kjartan Maraas * e-cell-text.c: (ect_event), (_blink_scroll_timeout): diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c index 0ebca14447..718b3e3e3e 100644 --- a/widgets/table/e-table-click-to-add.c +++ b/widgets/table/e-table-click-to-add.c @@ -162,7 +162,7 @@ etcta_drop_model (ETableClickToAdd *etcta) } static void -etcta_add_message (ETableClickToAdd *etcta, char *message) +etcta_add_message (ETableClickToAdd *etcta, const gchar *message) { etcta->message = g_strdup(message); } @@ -211,7 +211,7 @@ etcta_set_property (GObject *object, guint prop_id, const GValue *value, GParamS break; case PROP_MESSAGE: etcta_drop_message (etcta); - etcta_add_message (etcta, (char*)g_value_get_string (value)); + etcta_add_message (etcta, g_value_get_string (value)); break; case PROP_WIDTH: etcta->width = g_value_get_double (value); -- cgit v1.2.3