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

noreply at xfce.org noreply at xfce.org
Sun Jun 17 19:03:24 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   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 apps/parole.

commit 4e659fa844304b2cb56eac8c2f4ccc9c52e0a4f5
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Jun 17 13:03:19 2018 -0400

    Fix compiler error -Wcast-function-type (GCC 8)
---
 NEWS                              |  4 ++++
 src/misc/parole-provider-player.c |  2 +-
 src/misc/parole.h.in              |  6 +++---
 src/parole-disc.c                 |  6 +++---
 src/parole-mediachooser.c         |  4 ++--
 src/parole-medialist.c            | 12 ++++++------
 src/parole-module.c               |  6 +++---
 src/parole-utils.c                |  4 ++--
 8 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/NEWS b/NEWS
index bd706e7..1d9605b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+1.0.2 (UNRELEASED)
+=====
+- Fixed compiler error -Wcast-function-type (GCC 8)
+
 1.0.1
 =====
 Stable translations release.
diff --git a/src/misc/parole-provider-player.c b/src/misc/parole-provider-player.c
index 93ce98b..162ad7b 100644
--- a/src/misc/parole-provider-player.c
+++ b/src/misc/parole-provider-player.c
@@ -41,7 +41,7 @@ parole_provider_player_get_type(void) {
             sizeof (ParoleProviderPlayerIface),
             (GBaseInitFunc) parole_provider_player_base_init,
             NULL,
-            (GClassInitFunc) parole_provider_player_class_init,
+            (GClassInitFunc) (void (*)(void)) parole_provider_player_class_init,
             NULL,
             NULL,
             0,
diff --git a/src/misc/parole.h.in b/src/misc/parole.h.in
index eb8905f..cefaa9b 100644
--- a/src/misc/parole.h.in
+++ b/src/misc/parole.h.in
@@ -177,12 +177,12 @@ type_name##_register_type (ParoleProviderPlugin *provider_plugin_def) 		\
 	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, 									\
     }; 										\
 										\
@@ -211,7 +211,7 @@ type_name##_register_type (ParoleProviderPlugin *provider_plugin_def) 		\
 { 										\
     static const GInterfaceInfo parole_implement_interface_info = 		\
     { 										\
-	(GInterfaceInitFunc) iface_init 					\
+	(GInterfaceInitFunc) (void (*)(void)) iface_init 					\
     }; 										\
 										\
     g_type_module_add_interface ((GTypeModule*)provider_plugin_def, 		\
diff --git a/src/parole-disc.c b/src/parole-disc.c
index da76b58..303aa78 100644
--- a/src/parole-disc.c
+++ b/src/parole-disc.c
@@ -379,7 +379,7 @@ parole_disc_add_drive(ParoleDisc *disc, GDrive *drive, const gchar *device) {
         }
     }
 
-    g_list_foreach(list, (GFunc)g_object_unref, NULL);
+    g_list_foreach(list, (GFunc) (void (*)(void)) g_object_unref, NULL);
     g_list_free(list);
 }
 
@@ -420,7 +420,7 @@ parole_disc_get_drives(ParoleDisc *disc) {
         }
     }
 
-    g_list_foreach(list, (GFunc)g_object_unref, NULL);
+    g_list_foreach(list, (GFunc) (void (*)(void)) g_object_unref, NULL);
     g_list_free(list);
 }
 
@@ -548,7 +548,7 @@ parole_disc_finalize(GObject *object) {
 
     g_object_unref(disc->priv->monitor);
 
-    g_ptr_array_foreach(disc->priv->array, (GFunc)free_mount_data, NULL);
+    g_ptr_array_foreach(disc->priv->array, (GFunc) (void (*)(void)) free_mount_data, NULL);
     g_ptr_array_free(disc->priv->array, TRUE);
 
     G_OBJECT_CLASS(parole_disc_parent_class)->finalize(object);
diff --git a/src/parole-mediachooser.c b/src/parole-mediachooser.c
index 664cf97..a15b582 100644
--- a/src/parole-mediachooser.c
+++ b/src/parole-mediachooser.c
@@ -138,7 +138,7 @@ parole_media_chooser_add(ParoleMediaChooser *chooser, GtkWidget *file_chooser) {
 
             g_slist_free(media_files);
 
-            g_slist_foreach(files, (GFunc)g_free, NULL);
+            g_slist_foreach(files, (GFunc) (void (*)(void)) g_free, NULL);
             g_slist_free(files);
 
             return;
@@ -149,7 +149,7 @@ parole_media_chooser_add(ParoleMediaChooser *chooser, GtkWidget *file_chooser) {
     g_signal_emit(G_OBJECT(chooser), signals[MEDIA_FILES_OPENED], 0, media_files);
     g_slist_free(media_files);
 
-    g_slist_foreach(files, (GFunc)g_free, NULL);
+    g_slist_foreach(files, (GFunc) (void (*)(void)) g_free, NULL);
     g_slist_free(files);
 }
 
diff --git a/src/parole-medialist.c b/src/parole-medialist.c
index 9ad213f..9d62859 100644
--- a/src/parole-medialist.c
+++ b/src/parole-medialist.c
@@ -599,7 +599,7 @@ parole_media_list_get_first_selected_row(ParoleMediaList *list) {
         }
     }
 
-    g_list_foreach(path_list, (GFunc)gtk_tree_path_free, NULL);
+    g_list_foreach(path_list, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
     g_list_free(path_list);
 
     return row;
@@ -924,7 +924,7 @@ parole_media_list_remove_clicked_cb(GtkButton *button, ParoleMediaList *list) {
         gtk_tree_path_free(prev);
     }
 
-    g_list_foreach(path_list, (GFunc)gtk_tree_path_free, NULL);
+    g_list_foreach(path_list, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
     g_list_free(path_list);
 
     len = g_list_length(row_list);
@@ -941,7 +941,7 @@ parole_media_list_remove_clicked_cb(GtkButton *button, ParoleMediaList *list) {
         }
     }
 
-    g_list_foreach(row_list, (GFunc)gtk_tree_row_reference_free, NULL);
+    g_list_foreach(row_list, (GFunc) (void (*)(void)) gtk_tree_row_reference_free, NULL);
     g_list_free(row_list);
 
     /*
@@ -999,7 +999,7 @@ parole_media_list_move_up_clicked_cb(GtkButton *button, ParoleMediaList *list) {
         }
     }
 
-    g_list_foreach(path_list, (GFunc)gtk_tree_path_free, NULL);
+    g_list_foreach(path_list, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
     g_list_free(path_list);
 }
 
@@ -1043,7 +1043,7 @@ parole_media_list_move_down_clicked_cb(GtkButton *button, ParoleMediaList *list)
         }
     }
 
-    g_list_foreach(path_list, (GFunc)gtk_tree_path_free, NULL);
+    g_list_foreach(path_list, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
     g_list_free(path_list);
 }
 
@@ -1957,7 +1957,7 @@ void parole_media_list_save_list(ParoleMediaList *list) {
         fileslist = parole_media_list_get_files(list);
         if ( g_slist_length(fileslist) > 0 ) {
             parole_pl_parser_save_from_files(fileslist, history, PAROLE_PL_FORMAT_M3U);
-            g_slist_foreach(fileslist, (GFunc)g_object_unref, NULL);
+            g_slist_foreach(fileslist, (GFunc) (void (*)(void)) g_object_unref, NULL);
         } else {
             // If the playlist is empty, delete the list.
             if (remove(history) != 0)
diff --git a/src/parole-module.c b/src/parole-module.c
index b2f29c6..8dd20f6 100644
--- a/src/parole-module.c
+++ b/src/parole-module.c
@@ -49,17 +49,17 @@ parole_provider_module_get_type(void) {
             sizeof (ParoleProviderModuleClass),
             NULL,
             NULL,
-            (GClassInitFunc) parole_provider_module_class_init,
+            (GClassInitFunc) (void (*)(void)) parole_provider_module_class_init,
             NULL,
             NULL,
             sizeof (ParoleProviderModule),
             0,
-            (GInstanceInitFunc) parole_provider_module_init,
+            (GInstanceInitFunc) (void (*)(void)) parole_provider_module_init,
             NULL,
         };
 
         static const GInterfaceInfo plugin_info = {
-            (GInterfaceInitFunc) parole_provider_module_plugin_init,
+            (GInterfaceInitFunc) (void (*)(void)) parole_provider_module_plugin_init,
             NULL,
             NULL,
         };
diff --git a/src/parole-utils.c b/src/parole-utils.c
index 7a461a2..022924e 100644
--- a/src/parole-utils.c
+++ b/src/parole-utils.c
@@ -380,7 +380,7 @@ void parole_get_media_files(GtkFileFilter *filter, const gchar *path, gboolean r
             }
             g_free(path_internal);
         }
-        list_internal = g_slist_sort(list_internal, (GCompareFunc)thunar_file_compare_by_name);
+        list_internal = g_slist_sort(list_internal, (GCompareFunc) (void (*)(void)) thunar_file_compare_by_name);
         g_dir_close(dir);
         *list = g_slist_concat(*list, list_internal);
     }
@@ -523,7 +523,7 @@ parole_get_uri_from_unix_device(const gchar *device) {
         g_object_unref(drive);
     }
 
-    g_list_foreach(list, (GFunc)g_object_unref, NULL);
+    g_list_foreach(list, (GFunc) (void (*)(void)) g_object_unref, NULL);
     g_list_free(list);
 
     g_object_unref(monitor);

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


More information about the Xfce4-commits mailing list