diff options
author | Timm Bäder <mail@baedert.org> | 2020-03-06 16:36:42 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-03-06 16:36:42 +0100 |
commit | 0e8850bf84cfa174ba85a6d8468c5f7056aeca46 (patch) | |
tree | 70ba497b6fddbb610a5f1b6d9f44bf9c2ee93391 /examples | |
parent | d7fb33caf7f990a526deadbae32c88f550eb6c71 (diff) | |
download | gtk+-0e8850bf84cfa174ba85a6d8468c5f7056aeca46.tar.gz |
examples: Add common_cflags to build
And fix all the warnings and errors generated by doing so.
See #2491
Diffstat (limited to 'examples')
-rw-r--r-- | examples/meson.build | 2 | ||||
-rw-r--r-- | examples/plugman.c | 7 | ||||
-rw-r--r-- | examples/sunny.c | 3 |
3 files changed, 7 insertions, 5 deletions
diff --git a/examples/meson.build b/examples/meson.build index b5c28634ea..8fcc04d547 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -17,7 +17,7 @@ foreach ex : examples '-DGDK_DISABLE_DEPRECATED', '-DGTK_DISABLE_DEPRECATED', '-DGTK_SRCDIR="@0@"'.format(meson.current_source_dir()), - ], + ] + common_cflags, dependencies: libgtk_dep) endforeach diff --git a/examples/plugman.c b/examples/plugman.c index 67d7960c5d..d36b28bfb1 100644 --- a/examples/plugman.c +++ b/examples/plugman.c @@ -135,6 +135,7 @@ plug_man_open (GApplication *application, typedef GtkApplication PlugMan; typedef GtkApplicationClass PlugManClass; +static GType plug_man_get_type (void); G_DEFINE_TYPE (PlugMan, plug_man, GTK_TYPE_APPLICATION) static void @@ -376,10 +377,10 @@ configure_plugins (GSimpleAction *action, dialog = (GtkWidget *)gtk_builder_get_object (builder, "plugin-dialog"); check = (GtkWidget *)gtk_builder_get_object (builder, "red-plugin"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), plugin_enabled ("red")); - g_signal_connect (check, "toggled", G_CALLBACK (enable_or_disable_plugin), "red"); + g_signal_connect (check, "toggled", G_CALLBACK (enable_or_disable_plugin), (char *) "red"); check = (GtkWidget *)gtk_builder_get_object (builder, "black-plugin"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), plugin_enabled ("black")); - g_signal_connect (check, "toggled", G_CALLBACK (enable_or_disable_plugin), "black"); + g_signal_connect (check, "toggled", G_CALLBACK (enable_or_disable_plugin), (char *) "black"); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); @@ -481,7 +482,7 @@ plug_man_class_init (PlugManClass *class) } -PlugMan * +static PlugMan * plug_man_new (void) { return g_object_new (plug_man_get_type (), diff --git a/examples/sunny.c b/examples/sunny.c index e57e9edd80..3e3fc6a672 100644 --- a/examples/sunny.c +++ b/examples/sunny.c @@ -70,6 +70,7 @@ open (GApplication *application, typedef GtkApplication MenuButton; typedef GtkApplicationClass MenuButtonClass; +static GType menu_button_get_type (void); G_DEFINE_TYPE (MenuButton, menu_button, GTK_TYPE_APPLICATION) static void @@ -176,7 +177,7 @@ menu_button_class_init (MenuButtonClass *class) application_class->open = open; } -MenuButton * +static MenuButton * menu_button_new (void) { return g_object_new (menu_button_get_type (), |