Commit 192bc192 authored by Sean Davis's avatar Sean Davis 🕶

Fix -Wcast-function-type (GCC 8)

parent 47d53acb
4.13.3 (UNRELEASED)
======
- Fix: Uninitialized scalar variables (CID #292062, #292063)
- Fix: -Wcast-function-type (GCC 8)
- Ported from dbus-glib to gdbus (Xfce #14426)
- Improved display manufucturer name recognition:
- Refreshed PNP IDs from hwdata
......
......@@ -609,7 +609,7 @@ appearance_settings_load_icon_themes (preview_data *pd)
/* Free the check list */
if (G_LIKELY (check_list))
{
g_slist_foreach (check_list, (GFunc) g_free, NULL);
g_slist_foreach (check_list, (GFunc) (void (*)(void)) g_free, NULL);
g_slist_free (check_list);
}
......@@ -757,7 +757,7 @@ appearance_settings_load_ui_themes (preview_data *pd)
/* Free the check list */
if (G_LIKELY (check_list))
{
g_slist_foreach (check_list, (GFunc) g_free, NULL);
g_slist_foreach (check_list, (GFunc) (void (*)(void)) g_free, NULL);
g_slist_free (check_list);
}
......
......@@ -1198,11 +1198,11 @@ xfce_keyboard_settings_edit_button_clicked (XfceKeyboardSettings *settings)
}
/* Free row reference list */
g_list_foreach (row_references, (GFunc) gtk_tree_row_reference_free, NULL);
g_list_foreach (row_references, (GFunc) (void (*)(void)) gtk_tree_row_reference_free, NULL);
g_list_free (row_references);
/* Free row list */
g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
g_list_foreach (rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
g_list_free (rows);
}
......@@ -1255,11 +1255,11 @@ xfce_keyboard_settings_delete_button_clicked (XfceKeyboardSettings *settings)
}
/* Free row reference list */
g_list_foreach (row_references, (GFunc) gtk_tree_row_reference_free, NULL);
g_list_foreach (row_references, (GFunc) (void (*)(void)) gtk_tree_row_reference_free, NULL);
g_list_free (row_references);
/* Free row list */
g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
g_list_foreach (rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL);
g_list_free (rows);
}
......
......@@ -599,8 +599,8 @@ xfce_mime_chooser_set_mime_type (XfceMimeChooser *chooser,
gtk_tree_view_expand_all (GTK_TREE_VIEW (chooser->treeview));
/* cleanup */
g_list_foreach (recommended, (GFunc) g_object_unref, NULL);
g_list_foreach (all, (GFunc) g_object_unref, NULL);
g_list_foreach (recommended, (GFunc) (void (*)(void)) g_object_unref, NULL);
g_list_foreach (all, (GFunc) (void (*)(void)) g_object_unref, NULL);
g_list_free (recommended);
g_list_free (all);
g_list_free (other);
......
......@@ -1016,7 +1016,7 @@ xfce_mime_window_combo_populate (GtkCellRenderer *renderer,
gtk_combo_box_set_model (GTK_COMBO_BOX (editable), GTK_TREE_MODEL (model));
g_signal_connect_data (G_OBJECT (editable), "changed",
G_CALLBACK (xfce_mime_window_combo_changed), data,
(GClosureNotify) xfce_mime_window_combo_unref_data, 0);
(GClosureNotify) (void (*)(void)) xfce_mime_window_combo_unref_data, 0);
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable),
xfce_mime_window_combo_row_separator_func, NULL, NULL);
......
......@@ -203,7 +203,7 @@ mouse_settings_themes_pixbuf_from_filename (const gchar *filename,
pixbuf = gdk_pixbuf_new_from_data (buffer, GDK_COLORSPACE_RGB, TRUE,
8, image->width, image->height,
4 * image->width,
(GdkPixbufDestroyNotify) g_free, NULL);
(GdkPixbufDestroyNotify) (void (*)(void)) g_free, NULL);
/* don't leak when creating the pixbuf failed */
if (G_UNLIKELY (pixbuf == NULL))
......
......@@ -713,7 +713,7 @@ clipboard_manager_process_event (GsdClipboardManager *manager,
switch (xev->xany.type) {
case DestroyNotify:
if (xev->xdestroywindow.window == manager->priv->requestor) {
g_slist_foreach (manager->priv->contents, (GFunc) target_data_unref, NULL);
g_slist_foreach (manager->priv->contents, (GFunc) (void (*)(void)) target_data_unref, NULL);
g_slist_free (manager->priv->contents);
manager->priv->contents = NULL;
......@@ -741,7 +741,7 @@ clipboard_manager_process_event (GsdClipboardManager *manager,
if (xev->xselectionclear.selection == XA_CLIPBOARD_MANAGER) {
/* We lost the manager selection */
if (manager->priv->contents) {
g_slist_foreach (manager->priv->contents, (GFunc) target_data_unref, NULL);
g_slist_foreach (manager->priv->contents, (GFunc) (void (*)(void)) target_data_unref, NULL);
g_slist_free (manager->priv->contents);
manager->priv->contents = NULL;
......@@ -754,7 +754,7 @@ clipboard_manager_process_event (GsdClipboardManager *manager,
}
if (xev->xselectionclear.selection == XA_CLIPBOARD) {
/* We lost the clipboard selection */
g_slist_foreach (manager->priv->contents, (GFunc) target_data_unref, NULL);
g_slist_foreach (manager->priv->contents, (GFunc) (void (*)(void)) target_data_unref, NULL);
g_slist_free (manager->priv->contents);
manager->priv->contents = NULL;
clipboard_manager_watch_cb (manager,
......@@ -1008,13 +1008,13 @@ gsd_clipboard_manager_stop (GsdClipboardManager *manager)
}
if (manager->priv->conversions != NULL) {
g_slist_foreach (manager->priv->conversions, (GFunc) conversion_free, NULL);
g_slist_foreach (manager->priv->conversions, (GFunc) (void (*)(void)) conversion_free, NULL);
g_slist_free (manager->priv->conversions);
manager->priv->conversions = NULL;
}
if (manager->priv->contents != NULL) {
g_slist_foreach (manager->priv->contents, (GFunc) target_data_unref, NULL);
g_slist_foreach (manager->priv->contents, (GFunc) (void (*)(void)) target_data_unref, NULL);
g_slist_free (manager->priv->contents);
manager->priv->contents = NULL;
}
......
......@@ -284,7 +284,7 @@ xfce_xsettings_helper_fc_free (XfceXSettingsHelper *helper)
if (helper->fc_monitors != NULL)
{
/* remove monitors */
g_ptr_array_foreach (helper->fc_monitors, (GFunc) g_object_unref, NULL);
g_ptr_array_foreach (helper->fc_monitors, (GFunc) (void (*)(void)) g_object_unref, NULL);
g_ptr_array_free (helper->fc_monitors, TRUE);
helper->fc_monitors = NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment