diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-07-08 18:39:07 +0800 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-08-05 22:55:07 +0800 |
commit | f8c37da731af9f6cd74e7a0ef08fa02059d981ac (patch) | |
tree | 88678c98422ba129ac0b6f602c5832bc9570251b /libempathy | |
parent | 5cc326f741ab695e4fac8f4c4ccd99cf235115fc (diff) | |
download | gsoc2013-empathy-f8c37da731af9f6cd74e7a0ef08fa02059d981ac.tar gsoc2013-empathy-f8c37da731af9f6cd74e7a0ef08fa02059d981ac.tar.gz gsoc2013-empathy-f8c37da731af9f6cd74e7a0ef08fa02059d981ac.tar.bz2 gsoc2013-empathy-f8c37da731af9f6cd74e7a0ef08fa02059d981ac.tar.lz gsoc2013-empathy-f8c37da731af9f6cd74e7a0ef08fa02059d981ac.tar.xz gsoc2013-empathy-f8c37da731af9f6cd74e7a0ef08fa02059d981ac.tar.zst gsoc2013-empathy-f8c37da731af9f6cd74e7a0ef08fa02059d981ac.zip |
Fix missing entries in switch statements
Added missing default cases and missing enum cases.
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-contact.c | 6 | ||||
-rw-r--r-- | libempathy/empathy-dispatch-operation.c | 5 | ||||
-rw-r--r-- | libempathy/empathy-dispatcher.c | 3 | ||||
-rw-r--r-- | libempathy/empathy-ft-handler.c | 1 | ||||
-rw-r--r-- | libempathy/empathy-message.c | 3 | ||||
-rw-r--r-- | libempathy/empathy-status-presets.c | 4 | ||||
-rw-r--r-- | libempathy/empathy-utils.c | 7 |
7 files changed, 27 insertions, 2 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index e7286ac84..5347e7f38 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -1048,7 +1048,13 @@ empathy_contact_is_online (EmpathyContact *contact) case TP_CONNECTION_PRESENCE_TYPE_OFFLINE: case TP_CONNECTION_PRESENCE_TYPE_UNKNOWN: case TP_CONNECTION_PRESENCE_TYPE_ERROR: + case TP_CONNECTION_PRESENCE_TYPE_UNSET: return FALSE; + case TP_CONNECTION_PRESENCE_TYPE_AVAILABLE: + case TP_CONNECTION_PRESENCE_TYPE_AWAY: + case TP_CONNECTION_PRESENCE_TYPE_EXTENDED_AWAY: + case TP_CONNECTION_PRESENCE_TYPE_HIDDEN: + case TP_CONNECTION_PRESENCE_TYPE_BUSY: default: return TRUE; } diff --git a/libempathy/empathy-dispatch-operation.c b/libempathy/empathy-dispatch-operation.c index e59d69771..fa71f0130 100644 --- a/libempathy/empathy-dispatch-operation.c +++ b/libempathy/empathy-dispatch-operation.c @@ -130,10 +130,11 @@ empathy_dispatch_operation_set_property (GObject *object, case PROP_INCOMING: priv->incoming = g_value_get_boolean (value); break; - case PROP_USER_ACTION_TIME: priv->user_action_time = g_value_get_int64 (value); break; + default: + g_assert_not_reached (); } } @@ -167,6 +168,8 @@ empathy_dispatch_operation_get_property (GObject *object, case PROP_USER_ACTION_TIME: g_value_set_int64 (value, priv->user_action_time); break; + default: + g_assert_not_reached (); } } diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 30369c849..1cec0e9d8 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -526,6 +526,9 @@ dispatcher_start_dispatching (EmpathyDispatcher *self, case EMPATHY_DISPATCHER_OPERATION_STATE_PENDING: dispatch_operation_ready_cb (operation, self); break; + case EMPATHY_DISPATCHER_OPERATION_STATE_DISPATCHING: + case EMPATHY_DISPATCHER_OPERATION_STATE_CLAIMED: + case EMPATHY_DISPATCHER_OPERATION_STATE_INVALIDATED: default: g_assert_not_reached (); } diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c index 0140fc3cc..9fd993115 100644 --- a/libempathy/empathy-ft-handler.c +++ b/libempathy/empathy-ft-handler.c @@ -584,6 +584,7 @@ tp_file_hash_to_g_checksum (TpFileHashType type) case TP_FILE_HASH_TYPE_SHA256: retval = G_CHECKSUM_SHA256; break; + case TP_FILE_HASH_TYPE_NONE: default: g_assert_not_reached (); break; diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c index 07827f8e0..0ac6e01b5 100644 --- a/libempathy/empathy-message.c +++ b/libempathy/empathy-message.c @@ -603,6 +603,9 @@ empathy_message_type_to_str (TpChannelTextMessageType type) return "notice"; case TP_CHANNEL_TEXT_MESSAGE_TYPE_AUTO_REPLY: return "auto-reply"; + case TP_CHANNEL_TEXT_MESSAGE_TYPE_DELIVERY_REPORT: + return "delivery-report"; + case TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL: default: return "normal"; } diff --git a/libempathy/empathy-status-presets.c b/libempathy/empathy-status-presets.c index 255f7ab21..319ca53d9 100644 --- a/libempathy/empathy-status-presets.c +++ b/libempathy/empathy-status-presets.c @@ -431,6 +431,8 @@ empathy_status_presets_is_valid (TpConnectionPresenceType state) case TP_CONNECTION_PRESENCE_TYPE_HIDDEN: case TP_CONNECTION_PRESENCE_TYPE_BUSY: return TRUE; + + default: + return FALSE; } - return FALSE; } diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index b47987f85..fdc5b465d 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -254,6 +254,7 @@ empathy_presence_get_default_message (TpConnectionPresenceType presence) return _("Unknown"); case TP_CONNECTION_PRESENCE_TYPE_UNSET: case TP_CONNECTION_PRESENCE_TYPE_ERROR: + default: return NULL; } @@ -643,6 +644,12 @@ empathy_connect_new_account (TpAccount *account, g_free (message); break; + case TP_CONNECTION_PRESENCE_TYPE_AVAILABLE: + case TP_CONNECTION_PRESENCE_TYPE_AWAY: + case TP_CONNECTION_PRESENCE_TYPE_EXTENDED_AWAY: + case TP_CONNECTION_PRESENCE_TYPE_HIDDEN: + case TP_CONNECTION_PRESENCE_TYPE_BUSY: + case TP_CONNECTION_PRESENCE_TYPE_ERROR: default: /* do nothing if the presence is not offline */ break; |