[Xfce4-commits] [xfce/libxfce4ui] 01/01: Fix compiler error -Wcast-function-type (GCC 8)

noreply at xfce.org noreply at xfce.org
Tue Apr 16 04:36:55 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/libxfce4ui.

commit 3bbabdad0447b8fc456931e97d0303b230163f08
Author: Andre Miranda <andreldm at xfce.org>
Date:   Mon Apr 15 23:36:26 2019 -0300

    Fix compiler error -Wcast-function-type (GCC 8)
---
 libxfce4kbd-private/xfce-shortcuts-grabber.c  | 12 +++++++++---
 libxfce4kbd-private/xfce-shortcuts-provider.c | 10 +++++++---
 libxfce4ui/xfce-spawn.c                       |  8 +++++---
 3 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 43dfca6..361535b 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -188,7 +188,9 @@ static void
 xfce_shortcuts_grabber_grab_all (XfceShortcutsGrabber *grabber)
 {
   g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-  g_hash_table_foreach (grabber->priv->keys, (GHFunc) grab_key, grabber);
+  g_hash_table_foreach (grabber->priv->keys,
+                        (GHFunc) (void (*)(void)) grab_key,
+                        grabber);
 }
 
 
@@ -208,7 +210,9 @@ static void
 xfce_shortcuts_grabber_ungrab_all (XfceShortcutsGrabber *grabber)
 {
   g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-  g_hash_table_foreach (grabber->priv->keys, (GHFunc) ungrab_key, grabber);
+  g_hash_table_foreach (grabber->priv->keys,
+                        (GHFunc) (void (*)(void)) ungrab_key,
+                        grabber);
 }
 
 
@@ -470,7 +474,9 @@ xfce_shortcuts_grabber_event_filter (GdkXEvent            *gdk_xevent,
   TRACE ("Looking for %s", raw_shortcut_name);
   g_free (raw_shortcut_name);
 
-  g_hash_table_foreach (grabber->priv->keys, (GHFunc) find_event_key, &context);
+  g_hash_table_foreach (grabber->priv->keys,
+                        (GHFunc) (void (*)(void)) find_event_key,
+                        &context);
 
   if (G_LIKELY (context.result != NULL))
     /* We had a positive match */
diff --git a/libxfce4kbd-private/xfce-shortcuts-provider.c b/libxfce4kbd-private/xfce-shortcuts-provider.c
index 69c55b5..b7f7a47 100644
--- a/libxfce4kbd-private/xfce-shortcuts-provider.c
+++ b/libxfce4kbd-private/xfce-shortcuts-provider.c
@@ -441,7 +441,9 @@ xfce_shortcuts_provider_clone_defaults (XfceShortcutsProvider *provider)
   if (G_LIKELY (properties != NULL))
     {
       /* Copy from /commands/default to /commands/custom property by property */
-      g_hash_table_foreach (properties, (GHFunc) _xfce_shortcuts_provider_clone_default, provider);
+      g_hash_table_foreach (properties,
+                            (GHFunc) (void (*)(void)) _xfce_shortcuts_provider_clone_default,
+                            provider);
 
       g_hash_table_destroy (properties);
     }
@@ -523,7 +525,9 @@ xfce_shortcuts_provider_get_shortcuts (XfceShortcutsProvider *provider)
   context.properties = properties;
 
   if (G_LIKELY (properties != NULL))
-    g_hash_table_foreach (properties, (GHFunc) _xfce_shortcuts_provider_get_shortcut, &context);
+    g_hash_table_foreach (properties,
+                          (GHFunc) (void (*)(void)) _xfce_shortcuts_provider_get_shortcut,
+                          &context);
 
   return context.list;
 }
@@ -706,7 +710,7 @@ xfce_shortcuts_provider_reset_shortcut (XfceShortcutsProvider *provider,
 void
 xfce_shortcuts_free (GList *shortcuts)
 {
-  g_list_foreach (shortcuts, (GFunc) xfce_shortcut_free, NULL);
+  g_list_foreach (shortcuts, (GFunc) (void (*)(void)) xfce_shortcut_free, NULL);
 }
 
 
diff --git a/libxfce4ui/xfce-spawn.c b/libxfce4ui/xfce-spawn.c
index a31c359..b4946d3 100644
--- a/libxfce4ui/xfce-spawn.c
+++ b/libxfce4ui/xfce-spawn.c
@@ -137,7 +137,9 @@ xfce_spawn_startup_timeout_destroy (gpointer user_data)
     {
       pid = spawn_data->pid;
       g_source_remove (spawn_data->watch_id);
-      g_child_watch_add (pid, (GChildWatchFunc) g_spawn_close_pid, NULL);
+      g_child_watch_add (pid,
+                         (GChildWatchFunc) (void (*)(void)) g_spawn_close_pid,
+                         NULL);
     }
 }
 #endif
@@ -372,8 +374,8 @@ xfce_spawn_on_screen_with_child_watch (GdkScreen    *screen,
   if (G_LIKELY (startup_notify))
     {
       sn_display = sn_display_new (GDK_SCREEN_XDISPLAY (screen),
-                                   (SnDisplayErrorTrapPush) gdk_error_trap_push,
-                                   (SnDisplayErrorTrapPop) gdk_error_trap_pop);
+                                   (SnDisplayErrorTrapPush) (void (*)(void)) gdk_error_trap_push,
+                                   (SnDisplayErrorTrapPop) (void (*)(void)) gdk_error_trap_pop);
 
       if (G_LIKELY (sn_display != NULL))
         {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list