Fix compiler warnings ('Switch does not handle .. of enum ..')

This commit is contained in:
fiaxh 2021-10-12 16:27:56 +02:00
parent e8c162eae3
commit 237081e573
7 changed files with 45 additions and 3 deletions

View file

@ -99,7 +99,36 @@ public enum SecurityServices {
[CCode (cname = "srtp_err_status_t", cprefix = "srtp_err_status_", has_type_id = false)]
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)]

View file

@ -11,8 +11,9 @@ public class Util {
return Entities.Message.Type.GROUPCHAT;
case Conversation.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) {
@ -23,8 +24,9 @@ public class Util {
return Conversation.Type.GROUPCHAT;
case Entities.Message.Type.GROUPCHAT_PM:
return Conversation.Type.GROUPCHAT_PM;
default:
assert_not_reached();
}
assert_not_reached();
}
}

View file

@ -175,6 +175,9 @@ public class FileDefaultWidgetController : Object {
assert(stream_interactor != null && file_transfer != null);
stream_interactor.get_module(FileManager.IDENTITY).download_file.begin(file_transfer);
break;
default:
// Clicking doesn't do anything in FAILED and IN_PROGRESS states
break;
}
return false;
}

View file

@ -200,6 +200,8 @@ public class Dino.Ui.FreeDesktopNotifier : NotificationProvider, Object {
case ConnectionManager.ConnectionError.Source.TLS:
body = _("Invalid TLS certificate");
break;
default:
break;
}
HashTable<string, Variant> hash_table = new HashTable<string, Variant>(null, null);

View file

@ -69,6 +69,8 @@ public class BadMessagesPopulator : Plugins.ConversationItemPopulator, Plugins.C
selection.append(")");
qry.where(selection.str, selection_args);
break;
case Conversation.Type.GROUPCHAT_PM:
break;
}
foreach (Row row in qry) {

View file

@ -206,6 +206,8 @@ public class Dino.Plugins.Rtp.Plugin : RootInterface, VideoCallPlugin, Object {
old = devices.first_match((it) => it.matches(device));
if (old != null) devices.remove(old);
break;
default:
break;
}
if (device != null) {
switch (device.device_class) {

View file

@ -193,6 +193,8 @@ public class Module : XmppStreamModule {
case Affiliation.ADMIN:
if (other_affiliation == Affiliation.OWNER) return false;
break;
default:
return false;
}
return true;
} catch (InvalidJidError e) {