[Xfce4-commits] [xfce/xfce4-panel] 01/01: Fix compiler error -Wcast-function-type (GCC 8)
noreply at xfce.org
noreply at xfce.org
Sun Apr 14 17:57:43 CEST 2019
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-panel.
commit b2fb4b49a4f21022aae610b2de34779141b612b7
Author: Andre Miranda <andreldm at xfce.org>
Date: Sun Apr 14 12:57:27 2019 -0300
Fix compiler error -Wcast-function-type (GCC 8)
---
libxfce4panel/xfce-panel-macros.h | 4 ++--
libxfce4panel/xfce-panel-plugin-provider.c | 2 +-
libxfce4panel/xfce-panel-plugin.c | 2 +-
panel/panel-application.c | 2 +-
panel/panel-plugin-external.c | 8 ++++++--
plugins/clock/clock.c | 2 +-
plugins/directorymenu/directorymenu.c | 10 +++++-----
plugins/launcher/launcher-dialog.c | 2 +-
plugins/launcher/launcher.c | 6 +++---
plugins/pager/pager-buttons.c | 2 +-
plugins/systray/systray-manager.c | 2 +-
plugins/systray/systray.c | 2 +-
12 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/libxfce4panel/xfce-panel-macros.h b/libxfce4panel/xfce-panel-macros.h
index b4859a2..3506c7b 100644
--- a/libxfce4panel/xfce-panel-macros.h
+++ b/libxfce4panel/xfce-panel-macros.h
@@ -184,12 +184,12 @@ typedef GTypeModule XfcePanelTypeModule;
sizeof (TypeName##Class), \
NULL, \
NULL, \
- (GClassInitFunc) type_name##_class_intern_init, \
+ (GClassInitFunc) (void (*)(void)) type_name##_class_intern_init, \
NULL, \
NULL, \
sizeof (TypeName), \
0, \
- (GInstanceInitFunc) type_name##_init, \
+ (GInstanceInitFunc) (void (*)(void)) type_name##_init, \
NULL, \
}; \
\
diff --git a/libxfce4panel/xfce-panel-plugin-provider.c b/libxfce4panel/xfce-panel-plugin-provider.c
index bb6326a..9018e2d 100644
--- a/libxfce4panel/xfce-panel-plugin-provider.c
+++ b/libxfce4panel/xfce-panel-plugin-provider.c
@@ -56,7 +56,7 @@ xfce_panel_plugin_provider_get_type (void)
type = g_type_register_static_simple (G_TYPE_INTERFACE,
g_intern_static_string ("XfcePanelPluginProvider"),
sizeof (XfcePanelPluginProviderInterface),
- (GClassInitFunc) xfce_panel_plugin_provider_default_init,
+ (GClassInitFunc) (void (*)(void)) xfce_panel_plugin_provider_default_init,
0,
NULL,
0);
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index 8f49c63..aff2e15 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -1059,7 +1059,7 @@ xfce_panel_plugin_menu_move (XfcePanelPlugin *plugin)
panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (plugin));
/* wait for the popup to go down */
- g_idle_add ((GSourceFunc) xfce_panel_plugin_idle_move, plugin);
+ g_idle_add ((GSourceFunc) (void (*)(void)) xfce_panel_plugin_idle_move, plugin);
}
diff --git a/panel/panel-application.c b/panel/panel-application.c
index 01e389a..adcfb51 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -253,7 +253,7 @@ panel_application_finalize (GObject *object)
#endif
/* destroy all panels */
- g_slist_foreach (application->windows, (GFunc) gtk_widget_destroy, NULL);
+ g_slist_foreach (application->windows, (GFunc) (void (*)(void)) gtk_widget_destroy, NULL);
g_slist_free (application->windows);
g_object_unref (G_OBJECT (application->factory));
diff --git a/panel/panel-plugin-external.c b/panel/panel-plugin-external.c
index beebf0b..7f33218 100644
--- a/panel/panel-plugin-external.c
+++ b/panel/panel-plugin-external.c
@@ -253,7 +253,9 @@ panel_plugin_external_finalize (GObject *object)
{
/* remove the child watch and don't leave zombies */
g_source_remove (external->priv->watch_id);
- g_child_watch_add (external->priv->pid, (GChildWatchFunc) g_spawn_close_pid, NULL);
+ g_child_watch_add (external->priv->pid,
+ (GChildWatchFunc) (void (*)(void)) g_spawn_close_pid,
+ NULL);
}
panel_plugin_external_queue_free (external);
@@ -472,7 +474,9 @@ panel_plugin_external_child_ask_restart (PanelPluginExternal *external)
{
/* remove the child watch and don't leave zombies */
g_source_remove (external->priv->watch_id);
- g_child_watch_add (external->priv->pid, (GChildWatchFunc) g_spawn_close_pid, NULL);
+ g_child_watch_add (external->priv->pid,
+ (GChildWatchFunc) (void (*)(void)) g_spawn_close_pid,
+ NULL);
external->priv->watch_id = 0;
}
diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c
index ef64730..64a1073 100644
--- a/plugins/clock/clock.c
+++ b/plugins/clock/clock.c
@@ -1036,7 +1036,7 @@ clock_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
object = gtk_builder_get_object (builder, "mode");
g_signal_connect_data (G_OBJECT (object), "changed",
G_CALLBACK (clock_plugin_configure_plugin_mode_changed), dialog,
- (GClosureNotify) clock_plugin_configure_plugin_free, 0);
+ (GClosureNotify) (void (*)(void)) clock_plugin_configure_plugin_free, 0);
g_object_bind_property (G_OBJECT (plugin), "mode",
G_OBJECT (object), "active",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
diff --git a/plugins/directorymenu/directorymenu.c b/plugins/directorymenu/directorymenu.c
index 850084b..e0ab30d 100644
--- a/plugins/directorymenu/directorymenu.c
+++ b/plugins/directorymenu/directorymenu.c
@@ -764,7 +764,7 @@ directory_menu_plugin_menu_unload (GtkWidget *menu)
{
/* delay destruction so we can handle the activate event first */
gtk_container_foreach (GTK_CONTAINER (menu),
- (GtkCallback) panel_utils_destroy_later, NULL);
+ (GtkCallback) (void (*)(void)) panel_utils_destroy_later, NULL);
}
@@ -805,7 +805,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
g_signal_connect_data (G_OBJECT (mi), "activate",
G_CALLBACK (directory_menu_plugin_menu_open_folder),
- g_object_ref (dir), (GClosureNotify) g_object_unref, 0);
+ g_object_ref (dir), (GClosureNotify) (void (*)(void)) g_object_unref, 0);
gtk_widget_show (mi);
image = gtk_image_new_from_icon_name ("folder-open", GTK_ICON_SIZE_MENU);
@@ -820,7 +820,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
g_signal_connect_data (G_OBJECT (mi), "activate",
G_CALLBACK (directory_menu_plugin_menu_open_terminal),
- g_object_ref (dir), (GClosureNotify) g_object_unref, 0);
+ g_object_ref (dir), (GClosureNotify) (void (*)(void)) g_object_unref, 0);
gtk_widget_show (mi);
image = gtk_image_new_from_icon_name ("utilities-terminal", GTK_ICON_SIZE_MENU);
@@ -969,7 +969,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_connect_data (G_OBJECT (mi), "activate",
G_CALLBACK (directory_menu_plugin_menu_launch_desktop_file),
- desktopinfo, (GClosureNotify) g_object_unref, 0);
+ desktopinfo, (GClosureNotify) (void (*)(void)) g_object_unref, 0);
g_object_unref (G_OBJECT (file));
}
@@ -978,7 +978,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
{
g_signal_connect_data (G_OBJECT (mi), "activate",
G_CALLBACK (directory_menu_plugin_menu_launch), file,
- (GClosureNotify) g_object_unref, 0);
+ (GClosureNotify) (void (*)(void)) g_object_unref, 0);
}
g_object_unref (G_OBJECT (info));
diff --git a/plugins/launcher/launcher-dialog.c b/plugins/launcher/launcher-dialog.c
index a35b872..39588ea 100644
--- a/plugins/launcher/launcher-dialog.c
+++ b/plugins/launcher/launcher-dialog.c
@@ -1019,7 +1019,7 @@ launcher_dialog_tree_row_changed (GtkTreeModel *model,
panel_return_if_fail (GTK_IS_BUILDER (dialog->builder));
/* item moved with dnd, save the tree to update the plugin */
- gdk_threads_add_idle ((GSourceFunc) launcher_dialog_tree_save, dialog);
+ gdk_threads_add_idle ((GSourceFunc) (void (*)(void)) launcher_dialog_tree_save, dialog);
/* select the moved item to there is no selection change on reload */
treeview = gtk_builder_get_object (dialog->builder, "item-treeview");
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 6f5fce8..ea2e636 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -723,7 +723,7 @@ launcher_plugin_items_free (LauncherPlugin *plugin)
{
if (G_LIKELY (plugin->items != NULL))
{
- g_slist_foreach (plugin->items, (GFunc) g_object_unref, NULL);
+ g_slist_foreach (plugin->items, (GFunc) (void (*)(void)) g_object_unref, NULL);
g_slist_free (plugin->items);
plugin->items = NULL;
}
@@ -2678,7 +2678,7 @@ launcher_plugin_uri_list_free (GSList *uri_list)
{
if (uri_list != NULL)
{
- g_slist_foreach (uri_list, (GFunc) g_free, NULL);
+ g_slist_foreach (uri_list, (GFunc) (void (*)(void)) g_free, NULL);
g_slist_free (uri_list);
}
}
@@ -2691,7 +2691,7 @@ launcher_plugin_get_items (LauncherPlugin *plugin)
panel_return_val_if_fail (XFCE_IS_LAUNCHER_PLUGIN (plugin), NULL);
/* set extra reference and return a copy of the list */
- g_slist_foreach (plugin->items, (GFunc) g_object_ref, NULL);
+ g_slist_foreach (plugin->items, (GFunc) (void (*)(void)) g_object_ref, NULL);
return g_slist_copy (plugin->items);
}
diff --git a/plugins/pager/pager-buttons.c b/plugins/pager/pager-buttons.c
index 2a4f190..fbac26f 100644
--- a/plugins/pager/pager-buttons.c
+++ b/plugins/pager/pager-buttons.c
@@ -297,7 +297,7 @@ pager_buttons_rebuild_idle (gpointer user_data)
panel_return_val_if_fail (WNCK_IS_SCREEN (pager->wnck_screen), FALSE);
gtk_container_foreach (GTK_CONTAINER (pager),
- (GtkCallback) gtk_widget_destroy, NULL);
+ (GtkCallback) (void (*)(void)) gtk_widget_destroy, NULL);
g_slist_free (pager->buttons);
pager->buttons = NULL;
diff --git a/plugins/systray/systray-manager.c b/plugins/systray/systray-manager.c
index 639b25f..6883655 100644
--- a/plugins/systray/systray-manager.c
+++ b/plugins/systray/systray-manager.c
@@ -249,7 +249,7 @@ systray_manager_finalize (GObject *object)
{
/* cleanup all pending messages */
g_slist_foreach (manager->messages,
- (GFunc) systray_manager_message_free, NULL);
+ (GFunc) (void (*)(void)) systray_manager_message_free, NULL);
/* free the list */
g_slist_free (manager->messages);
diff --git a/plugins/systray/systray.c b/plugins/systray/systray.c
index 0a9c46a..3fb9520 100644
--- a/plugins/systray/systray.c
+++ b/plugins/systray/systray.c
@@ -744,7 +744,7 @@ systray_plugin_box_draw (GtkWidget *box,
/* separately draw all the composed tray icons after gtk
* handled the draw event */
gtk_container_foreach (GTK_CONTAINER (box),
- (GtkCallback) systray_plugin_box_draw_icon, cr);
+ (GtkCallback) (void (*)(void)) systray_plugin_box_draw_icon, cr);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list