From 1037398041a9188d7d6c9560d0761115a8009354 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 2 Oct 2012 19:30:50 +0200 Subject: [PATCH] gtk/tests: Fix for -Wmissing-declarations I'm adding a bunch of fixes for gcc complaining about -Wmissing-declarations after finding a bunch of cases today where I had forgotten to make functions static in the CSS code. This patch fixes the tests in gtk/tests. After this last patch, the gtk/ subdir should now compile without warnings when this flag is enabled. --- gtk/tests/builder.c | 10 ++++++++++ gtk/tests/cellarea.c | 10 ++++++++++ gtk/tests/rbtree.c | 2 +- gtk/tests/stylecontext.c | 2 +- gtk/tests/treestore.c | 2 ++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c index 563d422b21..d5a3d1ffc2 100644 --- a/gtk/tests/builder.c +++ b/gtk/tests/builder.c @@ -25,6 +25,16 @@ #include #include +/* exported for GtkBuilder */ +void signal_normal (GtkWindow *window, GParamSpec spec); +void signal_after (GtkWindow *window, GParamSpec spec); +void signal_object (GtkButton *button, GParamSpec spec); +void signal_object_after (GtkButton *button, GParamSpec spec); +void signal_first (GtkButton *button, GParamSpec spec); +void signal_second (GtkButton *button, GParamSpec spec); +void signal_extra (GtkButton *button, GParamSpec spec); +void signal_extra2 (GtkButton *button, GParamSpec spec); + /* Copied from gtkiconfactory.c; keep in sync! */ struct _GtkIconSet { diff --git a/gtk/tests/cellarea.c b/gtk/tests/cellarea.c index 471ea74eaf..98072ed046 100644 --- a/gtk/tests/cellarea.c +++ b/gtk/tests/cellarea.c @@ -78,6 +78,8 @@ test_iconview_object_new (void) typedef GtkIconView MyIconView; typedef GtkIconViewClass MyIconViewClass; +GType my_icon_view_get_type (void); + G_DEFINE_TYPE (MyIconView, my_icon_view, GTK_TYPE_ICON_VIEW) static void @@ -234,6 +236,8 @@ test_combobox_object_new (void) typedef GtkComboBox MyComboBox; typedef GtkComboBoxClass MyComboBoxClass; +GType my_combo_box_get_type (void); + G_DEFINE_TYPE (MyComboBox, my_combo_box, GTK_TYPE_COMBO_BOX) static void @@ -390,6 +394,8 @@ test_cellview_object_new (void) typedef GtkCellView MyCellView; typedef GtkCellViewClass MyCellViewClass; +GType my_cell_view_get_type (void); + G_DEFINE_TYPE (MyCellView, my_cell_view, GTK_TYPE_CELL_VIEW) static void @@ -544,6 +550,8 @@ test_column_object_new (void) typedef GtkTreeViewColumn MyTreeViewColumn; typedef GtkTreeViewColumnClass MyTreeViewColumnClass; +GType my_tree_view_column_get_type (void); + G_DEFINE_TYPE (MyTreeViewColumn, my_tree_view_column, GTK_TYPE_TREE_VIEW_COLUMN) static void @@ -698,6 +706,8 @@ test_completion_object_new (void) typedef GtkEntryCompletion MyEntryCompletion; typedef GtkEntryCompletionClass MyEntryCompletionClass; +GType my_entry_completion_get_type (void); + G_DEFINE_TYPE (MyEntryCompletion, my_entry_completion, GTK_TYPE_ENTRY_COMPLETION) static void diff --git a/gtk/tests/rbtree.c b/gtk/tests/rbtree.c index 84b752b8fb..6f79df7b07 100644 --- a/gtk/tests/rbtree.c +++ b/gtk/tests/rbtree.c @@ -198,7 +198,7 @@ _gtk_rbtree_test_structure (GtkRBTree *tree) _gtk_rbtree_test_structure_helper (tree, tree->root); } -void +static void _gtk_rbtree_test (GtkRBTree *tree) { GtkRBTree *tmp_tree; diff --git a/gtk/tests/stylecontext.c b/gtk/tests/stylecontext.c index a3a1e22165..3435ce41a1 100644 --- a/gtk/tests/stylecontext.c +++ b/gtk/tests/stylecontext.c @@ -313,7 +313,7 @@ test_style_property (void) g_object_unref (context); } -void +static void test_basic_properties (void) { GtkStyleContext *context; diff --git a/gtk/tests/treestore.c b/gtk/tests/treestore.c index dee0f6d22a..d19297f5bf 100644 --- a/gtk/tests/treestore.c +++ b/gtk/tests/treestore.c @@ -26,6 +26,8 @@ * - And we also need tests for creating these child levels, etc. */ +#include "treemodel.h" + #include static inline gboolean