[calls/wip/compiler-warnings: 5/12] Fix missing-declarations warnings all over the codebase
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls/wip/compiler-warnings: 5/12] Fix missing-declarations warnings all over the codebase
- Date: Fri, 16 Jul 2021 12:16:32 +0000 (UTC)
commit 1a4814570deac96e9b8432a608d3490b6ebde054
Author: Evangelos Ribeiro Tzaras <evangelos tzaras puri sm>
Date: Wed Jun 2 19:42:25 2021 +0200
Fix missing-declarations warnings all over the codebase
As caught by compiling with `-Wmissing-declarations`
by either making functions static, or declaring them in the header.
plugins/dummy/calls-dummy-provider.h | 6 ++++--
plugins/mm/calls-mm-provider.c | 8 ++++----
plugins/mm/calls-mm-provider.h | 7 +++++--
plugins/ofono/calls-ofono-provider.c | 4 ++--
plugins/ofono/calls-ofono-provider.h | 7 +++++--
plugins/sip/calls-sip-provider.h | 2 ++
src/calls-call-window.c | 4 ++--
src/calls-provider.c | 2 +-
8 files changed, 25 insertions(+), 15 deletions(-)
---
diff --git a/plugins/dummy/calls-dummy-provider.h b/plugins/dummy/calls-dummy-provider.h
index 513245a2..3df9df65 100644
--- a/plugins/dummy/calls-dummy-provider.h
+++ b/plugins/dummy/calls-dummy-provider.h
@@ -25,10 +25,11 @@
#ifndef CALLS_DUMMY_PROVIDER_H__
#define CALLS_DUMMY_PROVIDER_H__
-#include <glib-object.h>
-
#include "calls-provider.h"
+#include <glib-object.h>
+#include <libpeas/peas.h>
+
G_BEGIN_DECLS
#define CALLS_TYPE_DUMMY_PROVIDER (calls_dummy_provider_get_type ())
@@ -38,6 +39,7 @@ G_DECLARE_FINAL_TYPE (CallsDummyProvider, calls_dummy_provider, CALLS, DUMMY_PRO
CallsDummyProvider *calls_dummy_provider_new (void);
void calls_dummy_provider_add_origin (CallsDummyProvider *self,
const gchar *name);
+void peas_register_types (PeasObjectModule *module);
G_END_DECLS
diff --git a/plugins/mm/calls-mm-provider.c b/plugins/mm/calls-mm-provider.c
index 2156f27d..017b106c 100644
--- a/plugins/mm/calls-mm-provider.c
+++ b/plugins/mm/calls-mm-provider.c
@@ -96,7 +96,7 @@ update_status (CallsMMProvider *self)
}
-gboolean
+static gboolean
mm_provider_contains (CallsMMProvider *self,
MMObject *mm_obj)
{
@@ -252,7 +252,7 @@ add_mm_objects (CallsMMProvider *self)
}
-void
+static void
object_added_cb (CallsMMProvider *self,
GDBusObject *object)
{
@@ -263,7 +263,7 @@ object_added_cb (CallsMMProvider *self,
}
-void
+static void
object_removed_cb (CallsMMProvider *self,
GDBusObject *object)
{
@@ -326,7 +326,7 @@ mm_appeared_cb (GDBusConnection *connection,
}
-void
+static void
mm_vanished_cb (GDBusConnection *connection,
const gchar *name,
CallsMMProvider *self)
diff --git a/plugins/mm/calls-mm-provider.h b/plugins/mm/calls-mm-provider.h
index 0d0ec94a..88c455ea 100644
--- a/plugins/mm/calls-mm-provider.h
+++ b/plugins/mm/calls-mm-provider.h
@@ -25,10 +25,11 @@
#ifndef CALLS_MM_PROVIDER_H__
#define CALLS_MM_PROVIDER_H__
+#include "calls-provider.h"
+
#include <glib-object.h>
#include <gio/gio.h>
-
-#include "calls-provider.h"
+#include <libpeas/peas.h>
G_BEGIN_DECLS
@@ -36,6 +37,8 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (CallsMMProvider, calls_mm_provider, CALLS, MM_PROVIDER, CallsProvider)
+void peas_register_types (PeasObjectModule *module);
+
G_END_DECLS
#endif /* CALLS_MM_PROVIDER_H__ */
diff --git a/plugins/ofono/calls-ofono-provider.c b/plugins/ofono/calls-ofono-provider.c
index c1d4f8cc..ba9e5106 100644
--- a/plugins/ofono/calls-ofono-provider.c
+++ b/plugins/ofono/calls-ofono-provider.c
@@ -107,7 +107,7 @@ update_status (CallsOfonoProvider *self)
}
-gboolean
+static gboolean
ofono_find_origin_index (CallsOfonoProvider *self,
const char *path,
guint *index)
@@ -472,7 +472,7 @@ ofono_appeared_cb (GDBusConnection *connection,
}
-void
+static void
ofono_vanished_cb (GDBusConnection *connection,
const gchar *name,
CallsOfonoProvider *self)
diff --git a/plugins/ofono/calls-ofono-provider.h b/plugins/ofono/calls-ofono-provider.h
index eb190617..c65549d3 100644
--- a/plugins/ofono/calls-ofono-provider.h
+++ b/plugins/ofono/calls-ofono-provider.h
@@ -25,10 +25,11 @@
#ifndef CALLS_OFONO_PROVIDER_H__
#define CALLS_OFONO_PROVIDER_H__
+#include "calls-provider.h"
+
#include <glib-object.h>
#include <gio/gio.h>
-
-#include "calls-provider.h"
+#include <libpeas/peas.h>
G_BEGIN_DECLS
@@ -36,6 +37,8 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (CallsOfonoProvider, calls_ofono_provider, CALLS, OFONO_PROVIDER, CallsProvider)
+void peas_register_types (PeasObjectModule *module);
+
G_END_DECLS
#endif /* CALLS_OFONO_PROVIDER_H__ */
diff --git a/plugins/sip/calls-sip-provider.h b/plugins/sip/calls-sip-provider.h
index 27c9e587..1cfc837e 100644
--- a/plugins/sip/calls-sip-provider.h
+++ b/plugins/sip/calls-sip-provider.h
@@ -29,6 +29,7 @@
#include "calls-sip-origin.h"
#include <glib-object.h>
+#include <libpeas/peas.h>
G_BEGIN_DECLS
@@ -41,5 +42,6 @@ CallsSipOrigin *calls_sip_provider_add_origin (CallsSipProvider *s
CallsCredentials *credentials,
gint local_port,
gboolean direct_connection);
+void peas_register_types (PeasObjectModule *module);
G_END_DECLS
diff --git a/src/calls-call-window.c b/src/calls-call-window.c
index d33ce7ab..5a0f5ff9 100644
--- a/src/calls-call-window.c
+++ b/src/calls-call-window.c
@@ -267,7 +267,7 @@ call_selector_child_activated_cb (GtkFlowBox *box,
}
-void
+static void
add_call (CallsCallWindow *self,
CallsCall *call)
{
@@ -288,7 +288,7 @@ add_call (CallsCallWindow *self,
set_focus (self, display);
}
-void
+static void
remove_call (CallsCallWindow *self,
CallsCall *call,
const gchar *reason)
diff --git a/src/calls-provider.c b/src/calls-provider.c
index ce9c4399..06b1b0a3 100644
--- a/src/calls-provider.c
+++ b/src/calls-provider.c
@@ -66,7 +66,7 @@ calls_provider_real_get_status (CallsProvider *self)
return NULL;
}
-GListModel *
+static GListModel *
calls_provider_real_get_origins (CallsProvider *self)
{
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]