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

noreply at xfce.org noreply at xfce.org
Sat Jun 9 03:02:34 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 xfce/exo.

commit 66bea2cce71828cb7c0dbb6e09890e0aa78f376d
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Fri Jun 8 21:02:28 2018 -0400

    Fix -Wcast-function-type (GCC 8)
---
 exo-desktop-item-edit/exo-die-command-model.c |  6 +++---
 exo-desktop-item-edit/exo-die-desktop-model.c |  6 +++---
 exo-helper/exo-helper-chooser-dialog.c        |  2 +-
 exo/exo-binding.c                             | 10 +++++-----
 exo/exo-icon-bar.c                            |  4 ++--
 exo/exo-icon-chooser-dialog.c                 |  4 ++--
 exo/exo-icon-chooser-model.c                  |  2 +-
 exo/exo-icon-view-accessible.c                | 20 ++++++++++----------
 exo/exo-icon-view.c                           |  2 +-
 exo/exo-tree-view.c                           | 10 +++++-----
 exo/exo.symbols                               |  2 +-
 11 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/exo-desktop-item-edit/exo-die-command-model.c b/exo-desktop-item-edit/exo-die-command-model.c
index dcecaf7..684be19 100644
--- a/exo-desktop-item-edit/exo-die-command-model.c
+++ b/exo-desktop-item-edit/exo-die-command-model.c
@@ -175,11 +175,11 @@ exo_die_command_model_finalize (GObject *object)
     g_source_remove (command_model->collect_idle_id);
 
   /* release collected items (if any) */
-  g_slist_foreach (command_model->collect_items, (GFunc) g_free, NULL);
+  g_slist_foreach (command_model->collect_items, (GFunc) (void (*)(void)) g_free, NULL);
   g_slist_free (command_model->collect_items);
 
   /* release all items */
-  g_slist_foreach (command_model->items, (GFunc) g_free, NULL);
+  g_slist_foreach (command_model->items, (GFunc) (void (*)(void)) g_free, NULL);
   g_slist_free (command_model->items);
 
   (*G_OBJECT_CLASS (exo_die_command_model_parent_class)->finalize) (object);
@@ -510,7 +510,7 @@ exo_die_command_model_collect_thread (gpointer user_data)
   else
     {
       /* release the collected items */
-      g_slist_foreach (items, (GFunc) g_free, NULL);
+      g_slist_foreach (items, (GFunc) (void (*)(void)) g_free, NULL);
       g_slist_free (items);
     }
 
diff --git a/exo-desktop-item-edit/exo-die-desktop-model.c b/exo-desktop-item-edit/exo-die-desktop-model.c
index 4d85447..8995eb9 100644
--- a/exo-desktop-item-edit/exo-die-desktop-model.c
+++ b/exo-desktop-item-edit/exo-die-desktop-model.c
@@ -174,11 +174,11 @@ exo_die_desktop_model_finalize (GObject *object)
     g_source_remove (desktop_model->collect_idle_id);
 
   /* release collected items (if any) */
-  g_slist_foreach (desktop_model->collect_items, (GFunc) exo_die_desktop_item_free, NULL);
+  g_slist_foreach (desktop_model->collect_items, (GFunc) (void (*)(void)) exo_die_desktop_item_free, NULL);
   g_slist_free (desktop_model->collect_items);
 
   /* release all items */
-  g_slist_foreach (desktop_model->items, (GFunc) exo_die_desktop_item_free, NULL);
+  g_slist_foreach (desktop_model->items, (GFunc) (void (*)(void)) exo_die_desktop_item_free, NULL);
   g_slist_free (desktop_model->items);
 
   (*G_OBJECT_CLASS (exo_die_desktop_model_parent_class)->finalize) (object);
@@ -548,7 +548,7 @@ exo_die_desktop_model_collect_thread (gpointer user_data)
   else
     {
       /* release the collected items */
-      g_slist_foreach (items, (GFunc) exo_die_desktop_item_free, NULL);
+      g_slist_foreach (items, (GFunc) (void (*)(void)) exo_die_desktop_item_free, NULL);
       g_slist_free (items);
     }
 
diff --git a/exo-helper/exo-helper-chooser-dialog.c b/exo-helper/exo-helper-chooser-dialog.c
index 8db9893..8753858 100644
--- a/exo-helper/exo-helper-chooser-dialog.c
+++ b/exo-helper/exo-helper-chooser-dialog.c
@@ -65,7 +65,7 @@ exo_helper_chooser_dialog_get_type (void)
         NULL,
         sizeof (ExoHelperChooserDialog),
         0,
-        (GInstanceInitFunc) exo_helper_chooser_dialog_init,
+        (GInstanceInitFunc) (void (*)(void)) exo_helper_chooser_dialog_init,
         NULL,
       };
 
diff --git a/exo/exo-binding.c b/exo/exo-binding.c
index 8d5e116..a546e6d 100644
--- a/exo/exo-binding.c
+++ b/exo/exo-binding.c
@@ -357,7 +357,7 @@ exo_binding_new_full (GObject            *src_object,
   dst_pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (dst_object), dst_property);
 
   if (transform == NULL)
-    transform = (ExoBindingTransform) g_value_transform;
+    transform = (ExoBindingTransform) (void (*)(void)) g_value_transform;
 
   exo_bind_properties_transfer (src_object,
                                 src_pspec,
@@ -404,7 +404,7 @@ exo_binding_new_with_negation (GObject      *src_object,
                                GObject      *dst_object,
                                const gchar  *dst_property)
 {
-  ExoBindingTransform transform = (ExoBindingTransform) exo_g_value_transform_negate;
+  ExoBindingTransform transform = (ExoBindingTransform) (void (*)(void)) exo_g_value_transform_negate;
 
   return exo_binding_new_full (src_object, src_property,
                                dst_object, dst_property,
@@ -503,10 +503,10 @@ exo_mutual_binding_new_full (GObject            *object1,
   pspec2 = g_object_class_find_property (G_OBJECT_GET_CLASS (object2), property2);
 
   if (transform == NULL)
-    transform = (ExoBindingTransform) g_value_transform;
+    transform = (ExoBindingTransform) (void (*)(void)) g_value_transform;
 
   if (reverse_transform == NULL)
-    reverse_transform = (ExoBindingTransform) g_value_transform;
+    reverse_transform = (ExoBindingTransform) (void (*)(void)) g_value_transform;
 
   exo_bind_properties_transfer (object1,
                                 pspec1,
@@ -567,7 +567,7 @@ exo_mutual_binding_new_with_negation (GObject     *object1,
                                       GObject     *object2,
                                       const gchar *property2)
 {
-  ExoBindingTransform transform = (ExoBindingTransform) exo_g_value_transform_negate;
+  ExoBindingTransform transform = (ExoBindingTransform) (void (*)(void)) exo_g_value_transform_negate;
 
   return exo_mutual_binding_new_full (object1, property1,
                                       object2, property2,
diff --git a/exo/exo-icon-bar.c b/exo/exo-icon-bar.c
index de56df0..7c13127 100644
--- a/exo/exo-icon-bar.c
+++ b/exo/exo-icon-bar.c
@@ -905,7 +905,7 @@ exo_icon_bar_adjustment_changed (GtkAdjustment *adjustment,
 static void
 exo_icon_bar_invalidate (ExoIconBar *icon_bar)
 {
-  g_list_foreach (icon_bar->priv->items, (GFunc) exo_icon_bar_item_invalidate, NULL);
+  g_list_foreach (icon_bar->priv->items, (GFunc) (void (*)(void)) exo_icon_bar_item_invalidate, NULL);
   gtk_widget_queue_resize (GTK_WIDGET (icon_bar));
 }
 
@@ -1569,7 +1569,7 @@ exo_icon_bar_set_model (ExoIconBar    *icon_bar,
 
       g_object_unref (G_OBJECT (icon_bar->priv->model));
 
-      g_list_foreach (icon_bar->priv->items, (GFunc) exo_icon_bar_item_free, NULL);
+      g_list_foreach (icon_bar->priv->items, (GFunc) (void (*)(void)) exo_icon_bar_item_free, NULL);
       g_list_free (icon_bar->priv->items);
       icon_bar->priv->active_item = NULL;
       icon_bar->priv->cursor_item = NULL;
diff --git a/exo/exo-icon-chooser-dialog.c b/exo/exo-icon-chooser-dialog.c
index 3441812..933ebfe 100644
--- a/exo/exo-icon-chooser-dialog.c
+++ b/exo/exo-icon-chooser-dialog.c
@@ -522,7 +522,7 @@ exo_icon_chooser_dialog_combo_changed (GtkWidget            *combo,
         {
           /* make sure the selected item is visible */
           exo_icon_view_scroll_to_path (EXO_ICON_VIEW (priv->icon_chooser), selected_items->data, FALSE, 0.0f, 0.0f);
-          g_list_foreach (selected_items, (GFunc) gtk_tree_path_free, NULL);
+          g_list_foreach (selected_items, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
           g_list_free (selected_items);
         }
     }
@@ -689,7 +689,7 @@ exo_icon_chooser_dialog_get_icon (ExoIconChooserDialog *icon_chooser_dialog)
             gtk_tree_model_get (model, &iter, EXO_ICON_CHOOSER_MODEL_COLUMN_ICON_NAME, &icon, -1);
 
           /* release the list of selected items */
-          g_list_foreach (selected_items, (GFunc) gtk_tree_path_free, NULL);
+          g_list_foreach (selected_items, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
           g_list_free (selected_items);
         }
     }
diff --git a/exo/exo-icon-chooser-model.c b/exo/exo-icon-chooser-model.c
index de8166d..008dfdd 100644
--- a/exo/exo-icon-chooser-model.c
+++ b/exo/exo-icon-chooser-model.c
@@ -188,7 +188,7 @@ exo_icon_chooser_model_finalize (GObject *object)
     }
 
   /* release all items */
-  g_list_foreach (model->items, (GFunc) exo_icon_chooser_model_item_free, NULL);
+  g_list_foreach (model->items, (GFunc) (void (*)(void)) exo_icon_chooser_model_item_free, NULL);
   g_list_free (model->items);
 
   (*G_OBJECT_CLASS (exo_icon_chooser_model_parent_class)->finalize) (object);
diff --git a/exo/exo-icon-view-accessible.c b/exo/exo-icon-view-accessible.c
index ee375bd..3f7d235 100644
--- a/exo/exo-icon-view-accessible.c
+++ b/exo/exo-icon-view-accessible.c
@@ -1032,36 +1032,36 @@ exo_icon_view_item_accessible_get_type (void)
         sizeof (ExoIconViewItemAccessibleClass),
         (GBaseInitFunc) NULL, /* base init */
         (GBaseFinalizeFunc) NULL, /* base finalize */
-        (GClassInitFunc) exo_icon_view_item_accessible_class_init, /* class init */
+        (GClassInitFunc) (void (*)(void)) exo_icon_view_item_accessible_class_init, /* class init */
         (GClassFinalizeFunc) NULL, /* class finalize */
         NULL, /* class data */
         sizeof (ExoIconViewItemAccessible), /* instance size */
         0, /* nb preallocs */
-        (GInstanceInitFunc) exo_icon_view_item_accessible_object_init, /* instance init */
+        (GInstanceInitFunc) (void (*)(void)) exo_icon_view_item_accessible_object_init, /* instance init */
         NULL /* value table */
       };
 
       const GInterfaceInfo atk_component_info =
       {
-        (GInterfaceInitFunc) atk_component_item_interface_init,
+        (GInterfaceInitFunc) (void (*)(void)) atk_component_item_interface_init,
         (GInterfaceFinalizeFunc) NULL,
         NULL
       };
       const GInterfaceInfo atk_action_info =
       {
-        (GInterfaceInitFunc) atk_action_item_interface_init,
+        (GInterfaceInitFunc) (void (*)(void)) atk_action_item_interface_init,
         (GInterfaceFinalizeFunc) NULL,
         NULL
       };
       const GInterfaceInfo atk_image_info =
       {
-        (GInterfaceInitFunc) atk_image_item_interface_init,
+        (GInterfaceInitFunc) (void (*)(void)) atk_image_item_interface_init,
         (GInterfaceFinalizeFunc) NULL,
         NULL
       };
       const GInterfaceInfo atk_text_info =
       {
-        (GInterfaceInitFunc) atk_text_item_interface_init,
+        (GInterfaceInitFunc) (void (*)(void)) atk_text_item_interface_init,
         (GInterfaceFinalizeFunc) NULL,
         NULL
       };
@@ -1991,7 +1991,7 @@ exo_icon_view_accessible_get_type (void)
         0, /* class size */
         (GBaseInitFunc) NULL, /* base init */
         (GBaseFinalizeFunc) NULL, /* base finalize */
-        (GClassInitFunc) exo_icon_view_accessible_class_init,
+        (GClassInitFunc) (void (*)(void)) exo_icon_view_accessible_class_init,
         (GClassFinalizeFunc) NULL, /* class finalize */
         NULL, /* class data */
         0, /* instance size */
@@ -2001,13 +2001,13 @@ exo_icon_view_accessible_get_type (void)
       };
       const GInterfaceInfo atk_component_info =
       {
-        (GInterfaceInitFunc) atk_component_interface_init,
+        (GInterfaceInitFunc) (void (*)(void)) atk_component_interface_init,
         (GInterfaceFinalizeFunc) NULL,
         NULL
       };
       const GInterfaceInfo atk_selection_info =
       {
-        (GInterfaceInitFunc) exo_icon_view_accessible_selection_interface_init,
+        (GInterfaceInitFunc) (void (*)(void)) exo_icon_view_accessible_selection_interface_init,
         (GInterfaceFinalizeFunc) NULL,
         NULL
       };
@@ -2085,7 +2085,7 @@ exo_icon_view_accessible_factory_get_type (void)
         sizeof (AtkObjectFactoryClass),
         NULL,           /* base_init */
         NULL,           /* base_finalize */
-        (GClassInitFunc) exo_icon_view_accessible_factory_class_init,
+        (GClassInitFunc) (void (*)(void)) exo_icon_view_accessible_factory_class_init,
         NULL,           /* class_finalize */
         NULL,           /* class_data */
         sizeof (AtkObjectFactory),
diff --git a/exo/exo-icon-view.c b/exo/exo-icon-view.c
index 458e699..b70f056 100644
--- a/exo/exo-icon-view.c
+++ b/exo/exo-icon-view.c
@@ -5506,7 +5506,7 @@ exo_icon_view_cell_layout_clear (GtkCellLayout *layout)
 {
   ExoIconView *icon_view = EXO_ICON_VIEW (layout);
 
-  g_list_foreach (icon_view->priv->cell_list, (GFunc) free_cell_info, NULL);
+  g_list_foreach (icon_view->priv->cell_list, (GFunc) (void (*)(void)) free_cell_info, NULL);
   g_list_free (icon_view->priv->cell_list);
   icon_view->priv->cell_list = NULL;
   icon_view->priv->n_cells = 0;
diff --git a/exo/exo-tree-view.c b/exo/exo-tree-view.c
index 2d0fc04..19d2f9b 100644
--- a/exo/exo-tree-view.c
+++ b/exo/exo-tree-view.c
@@ -329,7 +329,7 @@ exo_tree_view_button_press_event (GtkWidget      *widget,
        * to tell the tree view that it may not alter the selection.
        */
       if (G_LIKELY (gtk_tree_selection_get_select_function (selection) == NULL))
-        gtk_tree_selection_set_select_function (selection, (GtkTreeSelectionFunc) exo_noop_false, NULL, NULL);
+        gtk_tree_selection_set_select_function (selection, (GtkTreeSelectionFunc) (void (*)(void)) exo_noop_false, NULL, NULL);
       else
         selected_paths = gtk_tree_selection_get_selected_rows (selection, NULL);
     }
@@ -377,7 +377,7 @@ exo_tree_view_button_press_event (GtkWidget      *widget,
       && path != NULL && gtk_tree_selection_path_is_selected (selection, path))
     {
       /* check if we have to restore paths */
-      if (G_LIKELY (gtk_tree_selection_get_select_function (selection) != (GtkTreeSelectionFunc) exo_noop_false))
+      if (G_LIKELY (gtk_tree_selection_get_select_function (selection) != (GtkTreeSelectionFunc) (void (*)(void)) exo_noop_false))
         {
           /* select all previously selected paths */
           for (lp = selected_paths; lp != NULL; lp = lp->next)
@@ -385,9 +385,9 @@ exo_tree_view_button_press_event (GtkWidget      *widget,
         }
     }
 
-  if (G_LIKELY (gtk_tree_selection_get_select_function (selection) == (GtkTreeSelectionFunc) exo_noop_false))
+  if (G_LIKELY (gtk_tree_selection_get_select_function (selection) == (GtkTreeSelectionFunc) (void (*)(void)) exo_noop_false))
     {
-      gtk_tree_selection_set_select_function (selection, (GtkTreeSelectionFunc) exo_noop_true, NULL, NULL);
+      gtk_tree_selection_set_select_function (selection, (GtkTreeSelectionFunc) (void (*)(void)) exo_noop_true, NULL, NULL);
     }
 
   /* release the path (if any) */
@@ -395,7 +395,7 @@ exo_tree_view_button_press_event (GtkWidget      *widget,
     gtk_tree_path_free (path);
 
   /* release the selected paths list */
-  g_list_foreach (selected_paths, (GFunc) gtk_tree_path_free, NULL);
+  g_list_foreach (selected_paths, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
   g_list_free (selected_paths);
 
   return result;
diff --git a/exo/exo.symbols b/exo/exo.symbols
index 8a9aae1..13bd406 100644
--- a/exo/exo.symbols
+++ b/exo/exo.symbols
@@ -244,7 +244,7 @@ exo_job_set_error_if_cancelled
 /* exo-utils functions */
 #if IN_HEADER(__EXO_UTILS_H__)
 #if IN_SOURCE(__EXO_UTILS_C__)
-exo_noop G_GNUC_PURE
+exo_noop
 exo_noop_one G_GNUC_PURE
 exo_noop_zero G_GNUC_PURE
 exo_noop_null G_GNUC_PURE

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


More information about the Xfce4-commits mailing list