summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-04-18 12:52:18 +0200
committerraveit65 <[email protected]>2021-04-20 09:18:19 +0200
commit82ff136d1bcd31d73c787c27e71fb57cb540a522 (patch)
tree228cf7f38bd77318ffcb20ec5d05d3792563cc2e
parent38f725d040c84d088a878ba9ad7481fa7adb7189 (diff)
downloadcaja-82ff136d1bcd31d73c787c27e71fb57cb540a522.tar.bz2
caja-82ff136d1bcd31d73c787c27e71fb57cb540a522.tar.xz
caja-window-manage-views: remove -Wcast-function-type warning
-rw-r--r--src/caja-window-manage-views.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c
index aa18030b..f41d8e5f 100644
--- a/src/caja-window-manage-views.c
+++ b/src/caja-window-manage-views.c
@@ -870,6 +870,14 @@ report_callback (CajaWindowSlot *slot,
return FALSE;
}
+static gpointer
+copy_object (gconstpointer obj,
+ gpointer user_data)
+{
+ (void) user_data;
+ return g_object_ref (G_OBJECT (obj));
+}
+
/*
* begin_location_change
*
@@ -947,7 +955,7 @@ begin_location_change (CajaWindowSlot *slot,
slot->location_change_type = type;
slot->location_change_distance = distance;
slot->tried_mount = FALSE;
- slot->pending_selection = g_list_copy_deep (new_selection, (GCopyFunc) g_object_ref, NULL);
+ slot->pending_selection = g_list_copy_deep (new_selection, copy_object, NULL);
slot->pending_scroll_to = g_strdup (scroll_pos);
@@ -1498,7 +1506,7 @@ load_new_location (CajaWindowSlot *slot,
window = slot->pane->window;
g_assert (CAJA_IS_WINDOW (window));
- selection_copy = g_list_copy_deep (selection, (GCopyFunc) g_object_ref, NULL);
+ selection_copy = g_list_copy_deep (selection, copy_object, NULL);
view = NULL;