diff options
author | Marvin W <git@larma.de> | 2020-01-21 21:53:43 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2020-01-21 21:55:08 +0100 |
commit | 4a9c05ea372e8f1279644ad6dc519ca407aec88a (patch) | |
tree | e76c9dfa5a716831a9f3496353d304c15fce84a0 /plugins | |
parent | 55b148a0f78c1abef57c21b2a84d97cad32b2290 (diff) | |
download | dino-4a9c05ea372e8f1279644ad6dc519ca407aec88a.tar.gz dino-4a9c05ea372e8f1279644ad6dc519ca407aec88a.zip |
Enabling display of more compiler warnings and fix some of them
Most of these are caused by various issues is the Vala compiler,
but it doesn't hurt to display them and report them upstream.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/crypto-vala/vapi/gcrypt.vapi | 4 | ||||
-rw-r--r-- | plugins/signal-protocol/src/store.vala | 14 | ||||
-rw-r--r-- | plugins/signal-protocol/vapi/signal-protocol-native.vapi | 16 |
3 files changed, 15 insertions, 19 deletions
diff --git a/plugins/crypto-vala/vapi/gcrypt.vapi b/plugins/crypto-vala/vapi/gcrypt.vapi index ca620e0f..0fa69a02 100644 --- a/plugins/crypto-vala/vapi/gcrypt.vapi +++ b/plugins/crypto-vala/vapi/gcrypt.vapi @@ -608,9 +608,9 @@ namespace GCrypt { CBC_CTS, /* Enable CBC cipher text stealing (CTS). */ CBC_MAC /* Enable CBC message auth. code (MAC). */ } - [Compact] [CCode (cname = "gcry_cipher_hd_t", lower_case_cprefix = "gcry_cipher_", free_function = "gcry_cipher_close")] - public class Cipher { + [SimpleType] + public struct Cipher { public static Error open (out Cipher cipher, Algorithm algo, Mode mode, Flag flags); public void close (); [CCode (cname = "gcry_cipher_ctl")] diff --git a/plugins/signal-protocol/src/store.vala b/plugins/signal-protocol/src/store.vala index 632ff8cc..b440d838 100644 --- a/plugins/signal-protocol/src/store.vala +++ b/plugins/signal-protocol/src/store.vala @@ -138,12 +138,12 @@ public class Store : Object { }); } - static int iks_destroy_func(void* user_data) { - return 0; + static void iks_destroy_func(void* user_data) { } static int ss_load_session_func(out Buffer? record, out Buffer? user_record, Address address, void* user_data) { Store store = (Store) user_data; + user_record = null; // No support for user_record uint8[]? res = null; try { res = store.session_store.load_session(address); @@ -156,7 +156,6 @@ public class Store : Object { return 0; } record = new Buffer.from((!)res); - user_record = null; // No support for user_record if (record == null) return ErrorCode.NOMEM; return 1; } @@ -204,8 +203,7 @@ public class Store : Object { }); } - static int ss_destroy_func(void* user_data) { - return 0; + static void ss_destroy_func(void* user_data) { } static int pks_load_pre_key(out Buffer? record, uint32 pre_key_id, void* user_data) { @@ -249,8 +247,7 @@ public class Store : Object { }); } - static int pks_destroy_func(void* user_data) { - return 0; + static void pks_destroy_func(void* user_data) { } static int spks_load_signed_pre_key(out Buffer? record, uint32 pre_key_id, void* user_data) { @@ -294,8 +291,7 @@ public class Store : Object { }); } - static int spks_destroy_func(void* user_data) { - return 0; + static void spks_destroy_func(void* user_data) { } internal Store(Context context) { diff --git a/plugins/signal-protocol/vapi/signal-protocol-native.vapi b/plugins/signal-protocol/vapi/signal-protocol-native.vapi index fd69d7d0..0bac0317 100644 --- a/plugins/signal-protocol/vapi/signal-protocol-native.vapi +++ b/plugins/signal-protocol/vapi/signal-protocol-native.vapi @@ -64,15 +64,15 @@ namespace Signal { [CCode (has_target = false)] public delegate int LoadSessionFunc(out Buffer record, out Buffer user_record, Address address, void* user_data); [CCode (has_target = false)] - public delegate int GetSubDeviceSessionsFunc(out IntList sessions, char[] name, void* user_data); + public delegate int GetSubDeviceSessionsFunc(out IntList sessions, [CCode (array_length_type = "size_t")] char[] name, void* user_data); [CCode (has_target = false)] - public delegate int StoreSessionFunc(Address address, uint8[] record, uint8[] user_record, void* user_data); + public delegate int StoreSessionFunc(Address address, [CCode (array_length_type = "size_t")] uint8[] record, [CCode (array_length_type = "size_t")] uint8[] user_record, void* user_data); [CCode (has_target = false)] public delegate int ContainsSessionFunc(Address address, void* user_data); [CCode (has_target = false)] public delegate int DeleteSessionFunc(Address address, void* user_data); [CCode (has_target = false)] - public delegate int DeleteAllSessionsFunc(char[] name, void* user_data); + public delegate int DeleteAllSessionsFunc([CCode (array_length_type = "size_t")] char[] name, void* user_data); [Compact] [CCode (cname = "signal_protocol_identity_key_store", cheader_filename = "signal/signal_protocol.h")] @@ -89,9 +89,9 @@ namespace Signal { [CCode (has_target = false)] public delegate int GetLocalRegistrationIdFunc(void* user_data, out uint32 registration_id); [CCode (has_target = false)] - public delegate int SaveIdentityFunc(Address address, uint8[] key, void* user_data); + public delegate int SaveIdentityFunc(Address address, [CCode (array_length_type = "size_t")] uint8[] key, void* user_data); [CCode (has_target = false)] - public delegate int IsTrustedIdentityFunc(Address address, uint8[] key, void* user_data); + public delegate int IsTrustedIdentityFunc(Address address, [CCode (array_length_type = "size_t")] uint8[] key, void* user_data); [Compact] [CCode (cname = "signal_protocol_pre_key_store", cheader_filename = "signal/signal_protocol.h")] @@ -106,7 +106,7 @@ namespace Signal { [CCode (has_target = false)] public delegate int LoadPreKeyFunc(out Buffer record, uint32 pre_key_id, void* user_data); [CCode (has_target = false)] - public delegate int StorePreKeyFunc(uint32 pre_key_id, uint8[] record, void* user_data); + public delegate int StorePreKeyFunc(uint32 pre_key_id, [CCode (array_length_type = "size_t")] uint8[] record, void* user_data); [CCode (has_target = false)] public delegate int ContainsPreKeyFunc(uint32 pre_key_id, void* user_data); [CCode (has_target = false)] @@ -134,12 +134,12 @@ namespace Signal { void* user_data; } [CCode (has_target = false)] - public delegate int StoreSenderKeyFunc(SenderKeyName sender_key_name, uint8[] record, uint8[] user_record, void* user_data); + public delegate int StoreSenderKeyFunc(SenderKeyName sender_key_name, [CCode (array_length_type = "size_t")] uint8[] record, [CCode (array_length_type = "size_t")] uint8[] user_record, void* user_data); [CCode (has_target = false)] public delegate int LoadSenderKeyFunc(out Buffer record, out Buffer user_record, SenderKeyName sender_key_name, void* user_data); [CCode (has_target = false)] - public delegate int DestroyFunc(void* user_data); + public delegate void DestroyFunc(void* user_data); [Compact] [CCode (cname = "signal_protocol_store_context", cprefix = "signal_protocol_store_context_", free_function="signal_protocol_store_context_destroy", cheader_filename = "signal/signal_protocol.h")] |