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.
This commit is contained in:
Benjamin Otte 2012-10-02 19:30:50 +02:00
parent 03f5ff20de
commit 1037398041
5 changed files with 24 additions and 2 deletions

View File

@ -25,6 +25,16 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
/* 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
{

View File

@ -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

View File

@ -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;

View File

@ -313,7 +313,7 @@ test_style_property (void)
g_object_unref (context);
}
void
static void
test_basic_properties (void)
{
GtkStyleContext *context;

View File

@ -26,6 +26,8 @@
* - And we also need tests for creating these child levels, etc.
*/
#include "treemodel.h"
#include <gtk/gtk.h>
static inline gboolean