From 96a7d901c1319d72c36ba6aa771ebdd1a50390f8 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Wed, 2 Jun 2021 20:18:50 +0200 Subject: [PATCH] Fix old-style warnings all over the codebase As caught by compiling with `-Wold-style-definition` and `-Wstrict-prototypes`. --- plugins/dummy/calls-dummy-provider.c | 2 +- plugins/dummy/calls-dummy-provider.h | 2 +- plugins/sip/calls-sip-media-manager.c | 2 +- plugins/sip/calls-sip-provider.c | 2 +- plugins/sip/calls-sip-provider.h | 2 +- plugins/sip/gst-rfc3551.c | 2 +- plugins/sip/gst-rfc3551.h | 2 +- src/calls-contacts-box.c | 2 +- src/calls-credentials.c | 2 +- src/calls-credentials.h | 2 +- src/calls-in-app-notification.c | 2 +- src/calls-in-app-notification.h | 2 +- src/calls-notifier.c | 2 +- src/calls-notifier.h | 2 +- src/calls-record-store.c | 2 +- tests/test-account.c | 2 +- tests/test-manager.c | 8 ++++---- tests/test-plugins.c | 2 +- tests/test-sip.c | 2 +- tests/test-util.c | 2 +- 20 files changed, 23 insertions(+), 23 deletions(-) diff --git a/plugins/dummy/calls-dummy-provider.c b/plugins/dummy/calls-dummy-provider.c index a1f63d6..4dd7152 100644 --- a/plugins/dummy/calls-dummy-provider.c +++ b/plugins/dummy/calls-dummy-provider.c @@ -173,7 +173,7 @@ calls_dummy_provider_add_origin (CallsDummyProvider *self, CallsDummyProvider * -calls_dummy_provider_new () +calls_dummy_provider_new (void) { return g_object_new (CALLS_TYPE_DUMMY_PROVIDER, NULL); } diff --git a/plugins/dummy/calls-dummy-provider.h b/plugins/dummy/calls-dummy-provider.h index 82d234d..513245a 100644 --- a/plugins/dummy/calls-dummy-provider.h +++ b/plugins/dummy/calls-dummy-provider.h @@ -35,7 +35,7 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (CallsDummyProvider, calls_dummy_provider, CALLS, DUMMY_PROVIDER, CallsProvider) -CallsDummyProvider *calls_dummy_provider_new (); +CallsDummyProvider *calls_dummy_provider_new (void); void calls_dummy_provider_add_origin (CallsDummyProvider *self, const gchar *name); diff --git a/plugins/sip/calls-sip-media-manager.c b/plugins/sip/calls-sip-media-manager.c index 61c7c59..b7760e7 100644 --- a/plugins/sip/calls-sip-media-manager.c +++ b/plugins/sip/calls-sip-media-manager.c @@ -81,7 +81,7 @@ calls_sip_media_manager_init (CallsSipMediaManager *self) /* Public functions */ CallsSipMediaManager * -calls_sip_media_manager_default () +calls_sip_media_manager_default (void) { static CallsSipMediaManager *instance = NULL; diff --git a/plugins/sip/calls-sip-provider.c b/plugins/sip/calls-sip-provider.c index f68226c..473530a 100644 --- a/plugins/sip/calls-sip-provider.c +++ b/plugins/sip/calls-sip-provider.c @@ -488,7 +488,7 @@ calls_sip_provider_add_origin (CallsSipProvider *self, CallsSipProvider * -calls_sip_provider_new () +calls_sip_provider_new (void) { return g_object_new (CALLS_TYPE_SIP_PROVIDER, NULL); } diff --git a/plugins/sip/calls-sip-provider.h b/plugins/sip/calls-sip-provider.h index 872ec08..27c9e58 100644 --- a/plugins/sip/calls-sip-provider.h +++ b/plugins/sip/calls-sip-provider.h @@ -36,7 +36,7 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (CallsSipProvider, calls_sip_provider, CALLS, SIP_PROVIDER, CallsProvider) -CallsSipProvider *calls_sip_provider_new (); +CallsSipProvider *calls_sip_provider_new (void); CallsSipOrigin *calls_sip_provider_add_origin (CallsSipProvider *self, CallsCredentials *credentials, gint local_port, diff --git a/plugins/sip/gst-rfc3551.c b/plugins/sip/gst-rfc3551.c index 797cadd..b8b68be 100644 --- a/plugins/sip/gst-rfc3551.c +++ b/plugins/sip/gst-rfc3551.c @@ -114,7 +114,7 @@ media_codec_get_gst_capabilities (MediaCodecInfo *codec) * Returns: (transfer none): A #GList of codec candidates of type #MediaCodecInfo */ GList * -media_codecs_get_candidates () +media_codecs_get_candidates (void) { GList *candidates = NULL; diff --git a/plugins/sip/gst-rfc3551.h b/plugins/sip/gst-rfc3551.h index 34829e1..7b77ab6 100644 --- a/plugins/sip/gst-rfc3551.h +++ b/plugins/sip/gst-rfc3551.h @@ -47,4 +47,4 @@ typedef struct { MediaCodecInfo* media_codec_by_name (const char *name); MediaCodecInfo* media_codec_by_payload_id (uint payload_id); gchar* media_codec_get_gst_capabilities (MediaCodecInfo *codec); -GList* media_codecs_get_candidates (); +GList* media_codecs_get_candidates (void); diff --git a/src/calls-contacts-box.c b/src/calls-contacts-box.c index 3acf4a3..f346d91 100644 --- a/src/calls-contacts-box.c +++ b/src/calls-contacts-box.c @@ -212,7 +212,7 @@ calls_contacts_box_init (CallsContactsBox *self) GtkWidget * -calls_contacts_box_new () +calls_contacts_box_new (void) { return g_object_new (CALLS_TYPE_CONTACTS_BOX, NULL); } diff --git a/src/calls-credentials.c b/src/calls-credentials.c index 97002b1..504c6f7 100644 --- a/src/calls-credentials.c +++ b/src/calls-credentials.c @@ -298,7 +298,7 @@ calls_credentials_init (CallsCredentials *self) CallsCredentials * -calls_credentials_new () +calls_credentials_new (void) { return g_object_new (CALLS_TYPE_CREDENTIALS, NULL); } diff --git a/src/calls-credentials.h b/src/calls-credentials.h index f8439f8..d110fa6 100644 --- a/src/calls-credentials.h +++ b/src/calls-credentials.h @@ -33,7 +33,7 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (CallsCredentials, calls_credentials, CALLS, CREDENTIALS, GObject); -CallsCredentials *calls_credentials_new (); +CallsCredentials *calls_credentials_new (void); gboolean calls_credentials_update_from_keyfile (CallsCredentials *self, GKeyFile *key_file, const char *name); diff --git a/src/calls-in-app-notification.c b/src/calls-in-app-notification.c index 943cd3a..14994eb 100644 --- a/src/calls-in-app-notification.c +++ b/src/calls-in-app-notification.c @@ -143,7 +143,7 @@ calls_in_app_notification_init (CallsInAppNotification *self) CallsInAppNotification * -calls_in_app_notification_new () +calls_in_app_notification_new (void) { return g_object_new (CALLS_TYPE_IN_APP_NOTIFICATION, NULL); } diff --git a/src/calls-in-app-notification.h b/src/calls-in-app-notification.h index 9a28387..d37d6f7 100644 --- a/src/calls-in-app-notification.h +++ b/src/calls-in-app-notification.h @@ -33,7 +33,7 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (CallsInAppNotification, calls_in_app_notification, CALLS, IN_APP_NOTIFICATION, GtkRevealer) -CallsInAppNotification * calls_in_app_notification_new (); +CallsInAppNotification * calls_in_app_notification_new (void); void calls_in_app_notification_show (CallsInAppNotification *self, const gchar *message); void calls_in_app_notification_hide (CallsInAppNotification *self); diff --git a/src/calls-notifier.c b/src/calls-notifier.c index 1c88fb0..7551f3f 100644 --- a/src/calls-notifier.c +++ b/src/calls-notifier.c @@ -165,7 +165,7 @@ calls_notifier_class_init (CallsNotifierClass *klass) } CallsNotifier * -calls_notifier_new () +calls_notifier_new (void) { return g_object_new (CALLS_TYPE_NOTIFIER, NULL); } diff --git a/src/calls-notifier.h b/src/calls-notifier.h index 647e3b5..c8212df 100644 --- a/src/calls-notifier.h +++ b/src/calls-notifier.h @@ -33,7 +33,7 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (CallsNotifier, calls_notifier, CALLS, NOTIFIER, GObject); -CallsNotifier *calls_notifier_new (); +CallsNotifier *calls_notifier_new (void); G_END_DECLS diff --git a/src/calls-record-store.c b/src/calls-record-store.c index c88d82a..2f6f2da 100644 --- a/src/calls-record-store.c +++ b/src/calls-record-store.c @@ -732,7 +732,7 @@ calls_record_store_init (CallsRecordStore *self) CallsRecordStore * -calls_record_store_new () +calls_record_store_new (void) { return g_object_new (CALLS_TYPE_RECORD_STORE, "item-type", CALLS_TYPE_CALL_RECORD, diff --git a/tests/test-account.c b/tests/test-account.c index acebcab..4ece23a 100644 --- a/tests/test-account.c +++ b/tests/test-account.c @@ -17,7 +17,7 @@ #include static void -test_account_basic () +test_account_basic (void) { CallsCredentials *alice = calls_credentials_new (); CallsCredentials *bob = calls_credentials_new (); diff --git a/tests/test-manager.c b/tests/test-manager.c index 22e102d..af93433 100644 --- a/tests/test-manager.c +++ b/tests/test-manager.c @@ -26,7 +26,7 @@ call_remove_cb (CallsManager *manager, CallsCall *call) } static void -test_calls_manager_without_provider () +test_calls_manager_without_provider (void) { guint no_origins; GListModel *origins; @@ -46,7 +46,7 @@ test_calls_manager_without_provider () } static void -test_calls_manager_dummy_provider () +test_calls_manager_dummy_provider (void) { g_autoptr (CallsManager) manager = calls_manager_new (); GListModel *origins; @@ -99,7 +99,7 @@ test_calls_manager_dummy_provider () } static void -test_calls_manager_mm_provider () +test_calls_manager_mm_provider (void) { GListModel *origins_tel; g_autoptr (CallsManager) manager = calls_manager_new (); @@ -121,7 +121,7 @@ test_calls_manager_mm_provider () } static void -test_calls_manager_multiple_providers_mm_sip () +test_calls_manager_multiple_providers_mm_sip (void) { g_autoptr (CallsCredentials) alice = NULL; g_autoptr (CallsCredentials) bob = NULL; diff --git a/tests/test-plugins.c b/tests/test-plugins.c index ed4cf74..a26b63a 100644 --- a/tests/test-plugins.c +++ b/tests/test-plugins.c @@ -12,7 +12,7 @@ #include static void -test_calls_plugin_loading () +test_calls_plugin_loading (void) { g_autoptr (CallsProvider) dummy_provider = NULL; g_autoptr (CallsProvider) mm_provider = NULL; diff --git a/tests/test-sip.c b/tests/test-sip.c index a2cb981..d33b8a5 100644 --- a/tests/test-sip.c +++ b/tests/test-sip.c @@ -438,7 +438,7 @@ find_string_in_sdp_message (const char *sdp, } static void -test_sip_media_manager () +test_sip_media_manager (void) { g_autoptr (CallsSipMediaManager) manager = calls_sip_media_manager_default (); char *sdp_message = NULL; diff --git a/tests/test-util.c b/tests/test-util.c index d2fbab7..62b9fbf 100644 --- a/tests/test-util.c +++ b/tests/test-util.c @@ -11,7 +11,7 @@ #include static void -test_protocol_prefix () +test_protocol_prefix (void) { g_assert_cmpstr (get_protocol_from_address ("sip:alice@example.org"), ==, "sip"); g_assert_cmpstr (get_protocol_from_address ("SIP:alice@example.org"), ==, "sip");