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:
		| @ -25,6 +25,16 @@ | |||||||
| #include <gtk/gtk.h> | #include <gtk/gtk.h> | ||||||
| #include <gdk/gdkkeysyms.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! */ | /* Copied from gtkiconfactory.c; keep in sync! */ | ||||||
| struct _GtkIconSet | struct _GtkIconSet | ||||||
| { | { | ||||||
|  | |||||||
| @ -78,6 +78,8 @@ test_iconview_object_new (void) | |||||||
| typedef GtkIconView MyIconView; | typedef GtkIconView MyIconView; | ||||||
| typedef GtkIconViewClass MyIconViewClass; | typedef GtkIconViewClass MyIconViewClass; | ||||||
|  |  | ||||||
|  | GType my_icon_view_get_type (void); | ||||||
|  |  | ||||||
| G_DEFINE_TYPE (MyIconView, my_icon_view, GTK_TYPE_ICON_VIEW) | G_DEFINE_TYPE (MyIconView, my_icon_view, GTK_TYPE_ICON_VIEW) | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @ -234,6 +236,8 @@ test_combobox_object_new (void) | |||||||
| typedef GtkComboBox MyComboBox; | typedef GtkComboBox MyComboBox; | ||||||
| typedef GtkComboBoxClass MyComboBoxClass; | typedef GtkComboBoxClass MyComboBoxClass; | ||||||
|  |  | ||||||
|  | GType my_combo_box_get_type (void); | ||||||
|  |  | ||||||
| G_DEFINE_TYPE (MyComboBox, my_combo_box, GTK_TYPE_COMBO_BOX) | G_DEFINE_TYPE (MyComboBox, my_combo_box, GTK_TYPE_COMBO_BOX) | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @ -390,6 +394,8 @@ test_cellview_object_new (void) | |||||||
| typedef GtkCellView MyCellView; | typedef GtkCellView MyCellView; | ||||||
| typedef GtkCellViewClass MyCellViewClass; | typedef GtkCellViewClass MyCellViewClass; | ||||||
|  |  | ||||||
|  | GType my_cell_view_get_type (void); | ||||||
|  |  | ||||||
| G_DEFINE_TYPE (MyCellView, my_cell_view, GTK_TYPE_CELL_VIEW) | G_DEFINE_TYPE (MyCellView, my_cell_view, GTK_TYPE_CELL_VIEW) | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @ -544,6 +550,8 @@ test_column_object_new (void) | |||||||
| typedef GtkTreeViewColumn MyTreeViewColumn; | typedef GtkTreeViewColumn MyTreeViewColumn; | ||||||
| typedef GtkTreeViewColumnClass MyTreeViewColumnClass; | typedef GtkTreeViewColumnClass MyTreeViewColumnClass; | ||||||
|  |  | ||||||
|  | GType my_tree_view_column_get_type (void); | ||||||
|  |  | ||||||
| G_DEFINE_TYPE (MyTreeViewColumn, my_tree_view_column, GTK_TYPE_TREE_VIEW_COLUMN) | G_DEFINE_TYPE (MyTreeViewColumn, my_tree_view_column, GTK_TYPE_TREE_VIEW_COLUMN) | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @ -698,6 +706,8 @@ test_completion_object_new (void) | |||||||
| typedef GtkEntryCompletion MyEntryCompletion; | typedef GtkEntryCompletion MyEntryCompletion; | ||||||
| typedef GtkEntryCompletionClass MyEntryCompletionClass; | typedef GtkEntryCompletionClass MyEntryCompletionClass; | ||||||
|  |  | ||||||
|  | GType my_entry_completion_get_type (void); | ||||||
|  |  | ||||||
| G_DEFINE_TYPE (MyEntryCompletion, my_entry_completion, GTK_TYPE_ENTRY_COMPLETION) | G_DEFINE_TYPE (MyEntryCompletion, my_entry_completion, GTK_TYPE_ENTRY_COMPLETION) | ||||||
|  |  | ||||||
| static void | static void | ||||||
|  | |||||||
| @ -198,7 +198,7 @@ _gtk_rbtree_test_structure (GtkRBTree *tree) | |||||||
|   _gtk_rbtree_test_structure_helper (tree, tree->root); |   _gtk_rbtree_test_structure_helper (tree, tree->root); | ||||||
| } | } | ||||||
|  |  | ||||||
| void | static void | ||||||
| _gtk_rbtree_test (GtkRBTree *tree) | _gtk_rbtree_test (GtkRBTree *tree) | ||||||
| { | { | ||||||
|   GtkRBTree *tmp_tree; |   GtkRBTree *tmp_tree; | ||||||
|  | |||||||
| @ -313,7 +313,7 @@ test_style_property (void) | |||||||
|   g_object_unref (context); |   g_object_unref (context); | ||||||
| } | } | ||||||
|  |  | ||||||
| void | static void | ||||||
| test_basic_properties (void) | test_basic_properties (void) | ||||||
| { | { | ||||||
|   GtkStyleContext *context; |   GtkStyleContext *context; | ||||||
|  | |||||||
| @ -26,6 +26,8 @@ | |||||||
|  *  - And we also need tests for creating these child levels, etc. |  *  - And we also need tests for creating these child levels, etc. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
|  | #include "treemodel.h" | ||||||
|  |  | ||||||
| #include <gtk/gtk.h> | #include <gtk/gtk.h> | ||||||
|  |  | ||||||
| static inline gboolean | static inline gboolean | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Benjamin Otte
					Benjamin Otte