diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-10-02 14:59:41 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-10-02 14:59:41 +0000 |
commit | 6ceee10068905da7baf63e2792d7757545fe3401 (patch) | |
tree | 3dd5c01232bf7b4ff1a519a7606b4ed15daa7bd9 /src | |
parent | 37be8fff1c6b2d6f94f8067ebfacf86dfa7382ab (diff) | |
parent | 3e1f4715f80e057d7e0b46e9966caee0bbf88444 (diff) | |
download | ayatana-indicator-messages-6ceee10068905da7baf63e2792d7757545fe3401.tar.gz ayatana-indicator-messages-6ceee10068905da7baf63e2792d7757545fe3401.tar.bz2 ayatana-indicator-messages-6ceee10068905da7baf63e2792d7757545fe3401.zip |
Return values from functions that have return values.
Somehow -Wreturn-type warnings aren't always triggered for g_return_if_fail macros.
Approved by Ted Gould, PS Jenkins bot.
Diffstat (limited to 'src')
-rw-r--r-- | src/im-application-list.c | 6 | ||||
-rw-r--r-- | src/messages-service.c | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c index fc9775f..b04321d 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -675,8 +675,8 @@ im_application_list_add (ImApplicationList *list, GSimpleAction *launch_action; IndicatorDesktopShortcuts * shortcuts = NULL; - g_return_if_fail (IM_IS_APPLICATION_LIST (list)); - g_return_if_fail (desktop_id != NULL); + g_return_val_if_fail (IM_IS_APPLICATION_LIST (list), FALSE); + g_return_val_if_fail (desktop_id != NULL, FALSE); if (im_application_list_lookup (list, desktop_id)) return TRUE; @@ -689,7 +689,7 @@ im_application_list_add (ImApplicationList *list, } id = g_app_info_get_id (G_APP_INFO (info)); - g_return_if_fail (id != NULL); + g_return_val_if_fail (id != NULL, FALSE); { const char * filename = g_desktop_app_info_get_filename(info); diff --git a/src/messages-service.c b/src/messages-service.c index 04e4fc6..2a5f3fd 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -99,11 +99,12 @@ set_status (IndicatorMessagesService *service, GDesktopAppInfo *appinfo; const gchar *id; - g_return_if_fail (g_str_equal (status_str, "available") || - g_str_equal (status_str, "away")|| - g_str_equal (status_str, "busy") || - g_str_equal (status_str, "invisible") || - g_str_equal (status_str, "offline")); + g_return_val_if_fail (g_str_equal (status_str, "available") || + g_str_equal (status_str, "away")|| + g_str_equal (status_str, "busy") || + g_str_equal (status_str, "invisible") || + g_str_equal (status_str, "offline"), + FALSE); appinfo = g_desktop_app_info_new (desktop_id); if (!appinfo) { |