[glib] build: Add missing "static" keyword where it should be used
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] build: Add missing "static" keyword where it should be used
- Date: Fri, 2 Nov 2012 13:05:14 +0000 (UTC)
commit 6d88a2f82294ffd6f75436e3f8e72b30fd591a03
Author: Colin Walters <walters verbum org>
Date: Thu Nov 1 19:35:38 2012 -0400
build: Add missing "static" keyword where it should be used
Otherwise we fail to build with -Werror=missing-prototypes.
https://bugzilla.gnome.org/show_bug.cgi?id=687385
gio/gdbusactiongroup.c | 2 +-
gio/gtestdbus.c | 2 +-
gio/tests/gdbus-peer-object-manager.c | 2 +-
gio/tests/gdbus-peer.c | 2 +-
gio/tests/resources.c | 2 +-
tests/libmoduletestplugin_a.c | 6 ++++++
tests/libmoduletestplugin_b.c | 8 ++++++++
tests/testgdate.c | 3 ++-
tests/testgdateparser.c | 3 ++-
tests/unicode-collate.c | 4 ++--
10 files changed, 25 insertions(+), 9 deletions(-)
---
diff --git a/gio/gdbusactiongroup.c b/gio/gdbusactiongroup.c
index b1c7649..e17b6c7 100644
--- a/gio/gdbusactiongroup.c
+++ b/gio/gdbusactiongroup.c
@@ -92,7 +92,7 @@ action_info_free (gpointer user_data)
g_slice_free (ActionInfo, info);
}
-ActionInfo *
+static ActionInfo *
action_info_new_from_iter (GVariantIter *iter)
{
const gchar *param_str;
diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c
index c2f91eb..6bb98cf 100644
--- a/gio/gtestdbus.c
+++ b/gio/gtestdbus.c
@@ -74,7 +74,7 @@ unref_on_idle (gpointer object)
return FALSE;
}
-gboolean
+static gboolean
_g_object_unref_and_wait_weak_notify (gpointer object)
{
WeakNotifyData data;
diff --git a/gio/tests/gdbus-peer-object-manager.c b/gio/tests/gdbus-peer-object-manager.c
index 89537cc..908003b 100644
--- a/gio/tests/gdbus-peer-object-manager.c
+++ b/gio/tests/gdbus-peer-object-manager.c
@@ -84,7 +84,7 @@ mock_interface_get_info (GDBusInterfaceSkeleton *skeleton)
return &interface_info;
}
-GVariant *
+static GVariant *
mock_interface_get_property (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index 0435597..917c888 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -1682,7 +1682,7 @@ codegen_service_thread_func (gpointer user_data)
}
-gboolean
+static gboolean
codegen_quit_mainloop_timeout (gpointer data)
{
g_main_loop_quit (loop);
diff --git a/gio/tests/resources.c b/gio/tests/resources.c
index d21513b..f7a7e83 100644
--- a/gio/tests/resources.c
+++ b/gio/tests/resources.c
@@ -487,7 +487,7 @@ test_uri_query_info (void)
g_resource_unref (resource);
}
-void
+static void
test_uri_file (void)
{
GResource *resource;
diff --git a/tests/libmoduletestplugin_a.c b/tests/libmoduletestplugin_a.c
index 150d50d..69fdd0f 100644
--- a/tests/libmoduletestplugin_a.c
+++ b/tests/libmoduletestplugin_a.c
@@ -30,6 +30,12 @@
#include <gmodule.h>
#include <stdlib.h>
+void gplugin_a_func (void);
+void gplugin_clash_func (void);
+void g_clash_func (void);
+void gplugin_say_boo_func (void);
+void gplugin_a_module_func (GModule *module);
+
G_MODULE_EXPORT gchar* gplugin_a_state;
G_MODULE_EXPORT void
diff --git a/tests/libmoduletestplugin_b.c b/tests/libmoduletestplugin_b.c
index 26e065d..26cc33f 100644
--- a/tests/libmoduletestplugin_b.c
+++ b/tests/libmoduletestplugin_b.c
@@ -31,6 +31,14 @@
G_MODULE_EXPORT gchar* gplugin_b_state;
+const gchar* g_module_check_init (GModule *module);
+void g_module_unload (GModule *module);
+
+void gplugin_b_func (void);
+void gplugin_clash_func (void);
+void g_clash_func (void);
+void gplugin_say_boo_func (void);
+
G_MODULE_EXPORT const gchar*
g_module_check_init (GModule *module)
{
diff --git a/tests/testgdate.c b/tests/testgdate.c
index 85d22dc..f5fc435 100644
--- a/tests/testgdate.c
+++ b/tests/testgdate.c
@@ -29,7 +29,8 @@ else \
if ((passed+notpassed) % 10000 == 0) g_print ("."); fflush (stdout); \
} G_STMT_END
-void g_date_debug_print(GDate* d)
+static void
+g_date_debug_print (GDate* d)
{
if (!d) g_print("NULL!\n");
else
diff --git a/tests/testgdateparser.c b/tests/testgdateparser.c
index f0e284a..ab94bcb 100644
--- a/tests/testgdateparser.c
+++ b/tests/testgdateparser.c
@@ -11,7 +11,8 @@
#include <string.h>
#include <locale.h>
-void g_date_debug_print(GDate* d)
+static void
+g_date_debug_print (GDate* d)
{
if (!d) g_print("NULL!\n");
else
diff --git a/tests/unicode-collate.c b/tests/unicode-collate.c
index 785f169..b276a2f 100644
--- a/tests/unicode-collate.c
+++ b/tests/unicode-collate.c
@@ -13,7 +13,7 @@ typedef struct {
} Line;
-int
+static int
compare_collate (const void *a, const void *b)
{
const Line *line_a = a;
@@ -22,7 +22,7 @@ compare_collate (const void *a, const void *b)
return g_utf8_collate (line_a->str, line_b->str);
}
-int
+static int
compare_key (const void *a, const void *b)
{
const Line *line_a = a;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]