summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-04-18 12:52:18 +0200
committerraveit65 <[email protected]>2022-07-21 19:33:51 +0200
commit055f25476afad8fc4e0cd38ef06a2a9c8eea2930 (patch)
tree0efeb931aee54f4dd062597a949fce099d090eec
parenta1ea3953fd50dbd7aa4943d95afa664dbae2b321 (diff)
downloadcaja-055f25476afad8fc4e0cd38ef06a2a9c8eea2930.tar.bz2
caja-055f25476afad8fc4e0cd38ef06a2a9c8eea2930.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 638d7824..26b2a865 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;