Fix compiler warnings ('Switch does not handle .. of enum ..')
This commit is contained in:
parent
e8c162eae3
commit
237081e573
|
@ -99,7 +99,36 @@ public enum SecurityServices {
|
||||||
|
|
||||||
[CCode (cname = "srtp_err_status_t", cprefix = "srtp_err_status_", has_type_id = false)]
|
[CCode (cname = "srtp_err_status_t", cprefix = "srtp_err_status_", has_type_id = false)]
|
||||||
public enum ErrorStatus {
|
public enum ErrorStatus {
|
||||||
ok, fail, bad_param, alloc_fail, dealloc_fail, init_fail, terminus, auth_fail, cipher_fail, replay_fail, algo_fail, no_such_op, no_ctx, cant_check, key_expired, socket_err, signal_err, nonce_bad, encode_err, semaphore_err, pfkey_err, bad_mki, pkt_idx_old, pkt_idx_adv
|
ok,
|
||||||
|
fail,
|
||||||
|
bad_param,
|
||||||
|
alloc_fail,
|
||||||
|
dealloc_fail,
|
||||||
|
init_fail,
|
||||||
|
terminus,
|
||||||
|
auth_fail,
|
||||||
|
cipher_fail,
|
||||||
|
replay_fail,
|
||||||
|
replay_old,
|
||||||
|
|
||||||
|
algo_fail,
|
||||||
|
no_such_op,
|
||||||
|
no_ctx,
|
||||||
|
cant_check,
|
||||||
|
key_expired,
|
||||||
|
socket_err,
|
||||||
|
signal_err,
|
||||||
|
nonce_bad,
|
||||||
|
read_fail,
|
||||||
|
write_fail,
|
||||||
|
|
||||||
|
parse_err,
|
||||||
|
encode_err,
|
||||||
|
semaphore_err,
|
||||||
|
pfkey_err,
|
||||||
|
bad_mki,
|
||||||
|
pkt_idx_old,
|
||||||
|
pkt_idx_adv
|
||||||
}
|
}
|
||||||
|
|
||||||
[CCode (cname = "srtp_log_level_t", cprefix = "srtp_log_level_", has_type_id = false)]
|
[CCode (cname = "srtp_log_level_t", cprefix = "srtp_log_level_", has_type_id = false)]
|
||||||
|
|
|
@ -11,9 +11,10 @@ public class Util {
|
||||||
return Entities.Message.Type.GROUPCHAT;
|
return Entities.Message.Type.GROUPCHAT;
|
||||||
case Conversation.Type.GROUPCHAT_PM:
|
case Conversation.Type.GROUPCHAT_PM:
|
||||||
return Entities.Message.Type.GROUPCHAT_PM;
|
return Entities.Message.Type.GROUPCHAT_PM;
|
||||||
}
|
default:
|
||||||
assert_not_reached();
|
assert_not_reached();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static Conversation.Type get_conversation_type_for_message(Message message) {
|
public static Conversation.Type get_conversation_type_for_message(Message message) {
|
||||||
switch (message.type_) {
|
switch (message.type_) {
|
||||||
|
@ -23,9 +24,10 @@ public class Util {
|
||||||
return Conversation.Type.GROUPCHAT;
|
return Conversation.Type.GROUPCHAT;
|
||||||
case Entities.Message.Type.GROUPCHAT_PM:
|
case Entities.Message.Type.GROUPCHAT_PM:
|
||||||
return Conversation.Type.GROUPCHAT_PM;
|
return Conversation.Type.GROUPCHAT_PM;
|
||||||
}
|
default:
|
||||||
assert_not_reached();
|
assert_not_reached();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,6 +175,9 @@ public class FileDefaultWidgetController : Object {
|
||||||
assert(stream_interactor != null && file_transfer != null);
|
assert(stream_interactor != null && file_transfer != null);
|
||||||
stream_interactor.get_module(FileManager.IDENTITY).download_file.begin(file_transfer);
|
stream_interactor.get_module(FileManager.IDENTITY).download_file.begin(file_transfer);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
// Clicking doesn't do anything in FAILED and IN_PROGRESS states
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,6 +200,8 @@ public class Dino.Ui.FreeDesktopNotifier : NotificationProvider, Object {
|
||||||
case ConnectionManager.ConnectionError.Source.TLS:
|
case ConnectionManager.ConnectionError.Source.TLS:
|
||||||
body = _("Invalid TLS certificate");
|
body = _("Invalid TLS certificate");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
HashTable<string, Variant> hash_table = new HashTable<string, Variant>(null, null);
|
HashTable<string, Variant> hash_table = new HashTable<string, Variant>(null, null);
|
||||||
|
|
|
@ -69,6 +69,8 @@ public class BadMessagesPopulator : Plugins.ConversationItemPopulator, Plugins.C
|
||||||
selection.append(")");
|
selection.append(")");
|
||||||
qry.where(selection.str, selection_args);
|
qry.where(selection.str, selection_args);
|
||||||
break;
|
break;
|
||||||
|
case Conversation.Type.GROUPCHAT_PM:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Row row in qry) {
|
foreach (Row row in qry) {
|
||||||
|
|
|
@ -206,6 +206,8 @@ public class Dino.Plugins.Rtp.Plugin : RootInterface, VideoCallPlugin, Object {
|
||||||
old = devices.first_match((it) => it.matches(device));
|
old = devices.first_match((it) => it.matches(device));
|
||||||
if (old != null) devices.remove(old);
|
if (old != null) devices.remove(old);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (device != null) {
|
if (device != null) {
|
||||||
switch (device.device_class) {
|
switch (device.device_class) {
|
||||||
|
|
|
@ -193,6 +193,8 @@ public class Module : XmppStreamModule {
|
||||||
case Affiliation.ADMIN:
|
case Affiliation.ADMIN:
|
||||||
if (other_affiliation == Affiliation.OWNER) return false;
|
if (other_affiliation == Affiliation.OWNER) return false;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} catch (InvalidJidError e) {
|
} catch (InvalidJidError e) {
|
||||||
|
|
Loading…
Reference in a new issue