From 28a6895df5fa4a1a60c794ed5e85e31d764e85e7 Mon Sep 17 00:00:00 2001 From: rbuj Date: Fri, 28 Feb 2020 09:07:37 +0100 Subject: Remove warnings: cast between incompatible function types --- plugins/filebrowser/pluma-file-browser-widget.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'plugins/filebrowser/pluma-file-browser-widget.c') diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c index 25ec921a..58afc036 100644 --- a/plugins/filebrowser/pluma-file-browser-widget.c +++ b/plugins/filebrowser/pluma-file-browser-widget.c @@ -343,8 +343,7 @@ pluma_file_browser_widget_finalize (GObject * object) g_object_unref (obj->priv->bookmarks_store); g_object_unref (obj->priv->combo_model); - g_slist_foreach (obj->priv->filter_funcs, (GFunc) g_free, NULL); - g_slist_free (obj->priv->filter_funcs); + g_slist_free_full (obj->priv->filter_funcs, g_free); for (loc = obj->priv->locations; loc; loc = loc->next) location_free ((Location *) (loc->data)); @@ -1334,8 +1333,7 @@ pluma_file_browser_widget_get_first_selected (PlumaFileBrowserWidget *obj, result = gtk_tree_model_get_iter(model, iter, (GtkTreePath *)(rows->data)); - g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL); - g_list_free (rows); + g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free); return result; } @@ -1457,8 +1455,7 @@ get_deletable_files (PlumaFileBrowserWidget *obj) { paths = g_list_append (paths, gtk_tree_path_copy (path)); } - g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL); - g_list_free (rows); + g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free); return paths; } @@ -1491,8 +1488,7 @@ delete_selected_files (PlumaFileBrowserWidget * obj, gboolean trash) result = pluma_file_browser_store_delete_all (PLUMA_FILE_BROWSER_STORE (model), rows, trash); - g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL); - g_list_free (rows); + g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free); return result == PLUMA_FILE_BROWSER_STORE_RESULT_OK; } @@ -2055,8 +2051,7 @@ pluma_file_browser_widget_get_num_selected_files_or_directories (PlumaFileBrowse } } - g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL); - g_list_free (rows); + g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free); return result; } @@ -2179,8 +2174,7 @@ try_activate_drive (PlumaFileBrowserWidget *widget, try_mount_volume (widget, volume); } - g_list_foreach (volumes, (GFunc)g_object_unref, NULL); - g_list_free (volumes); + g_list_free_full (volumes, g_object_unref); } static void -- cgit v1.2.1