diff options
author | rbuj <[email protected]> | 2021-04-18 12:53:11 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-04-20 09:18:19 +0200 |
commit | a940185ca0ee157b980250d7f2f5bef842e3625f (patch) | |
tree | d759366eb0f3b575c2ad896b6e2057b28ef2724c | |
parent | 4392bdd9cf47a5ff16f0467448b0c01e7c800439 (diff) | |
download | caja-a940185ca0ee157b980250d7f2f5bef842e3625f.tar.bz2 caja-a940185ca0ee157b980250d7f2f5bef842e3625f.tar.xz |
caja-window: remove -Wcast-function-type warning
-rw-r--r-- | src/caja-window.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/caja-window.c b/src/caja-window.c index 0f881c1a..8de4f27b 100644 --- a/src/caja-window.c +++ b/src/caja-window.c @@ -1114,14 +1114,14 @@ caja_window_key_press_event (GtkWidget *widget, */ static void -free_activate_view_data (gpointer data) +free_activate_view_data (gpointer data, + GClosure *closure) { ActivateViewData *activate_data; + (void) closure; activate_data = data; - g_free (activate_data->id); - g_slice_free (ActivateViewData, activate_data); } @@ -1205,7 +1205,7 @@ add_view_as_menu_item (CajaWindow *window, data->id = g_strdup (identifier); g_signal_connect_data (action, "activate", G_CALLBACK (action_view_as_callback), - data, (GClosureNotify) free_activate_view_data, 0); + data, free_activate_view_data, 0); G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_action_group_add_action (window->details->view_as_action_group, @@ -1974,10 +1974,18 @@ caja_get_history_list (void) return history_list; } +static gpointer +caja_window_copy_history_item (gconstpointer src, + gpointer data) +{ + (void) data; + return g_object_ref (G_OBJECT (src)); +} + static GList * caja_window_get_history (CajaWindow *window) { - return g_list_copy_deep (history_list, (GCopyFunc) g_object_ref, NULL); + return g_list_copy_deep (history_list, caja_window_copy_history_item, NULL); } |