diff options
author | rbuj <[email protected]> | 2021-10-21 14:50:15 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2024-01-25 23:36:35 +0100 |
commit | 9f033b7ecb7209174cb8ec0c35e10cf57942398a (patch) | |
tree | 4243c581ae578da8536d29dfdae33ef2d082232c /plugins | |
parent | 9be22af84f9f8bdfa26bab8cdb5c3c267d7e7003 (diff) | |
download | pluma-9f033b7ecb7209174cb8ec0c35e10cf57942398a.tar.bz2 pluma-9f033b7ecb7209174cb8ec0c35e10cf57942398a.tar.xz |
filebrowser: fix warning -Wincompatible-pointer-types
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/filebrowser/pluma-file-bookmarks-store.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/plugins/filebrowser/pluma-file-bookmarks-store.c b/plugins/filebrowser/pluma-file-bookmarks-store.c index ed58f067..0f92ca66 100644 --- a/plugins/filebrowser/pluma-file-bookmarks-store.c +++ b/plugins/filebrowser/pluma-file-bookmarks-store.c @@ -824,10 +824,8 @@ pluma_file_bookmarks_store_get_uri (PlumaFileBookmarksStore * model, GtkTreeIter * iter) { GObject * obj; - GFile * file = NULL; guint flags; gchar * ret = NULL; - gboolean isfs; g_return_val_if_fail (PLUMA_IS_FILE_BOOKMARKS_STORE (model), NULL); g_return_val_if_fail (iter != NULL, NULL); @@ -839,26 +837,25 @@ pluma_file_bookmarks_store_get_uri (PlumaFileBookmarksStore * model, &obj, -1); - if (obj == NULL) - return NULL; - - isfs = (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_FS); - - if (isfs && (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_MOUNT)) - { - file = g_mount_get_root (G_MOUNT (obj)); - } - else if (!isfs) + if (obj != NULL) { - file = g_object_ref (obj); - } + if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_FS) + { + if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_MOUNT) + { + GFile * file; - g_object_unref (obj); + file = g_mount_get_root (G_MOUNT (obj)); + ret = g_file_get_uri (file); + g_object_unref (file); + } + } + else + { + ret = g_file_get_uri (G_FILE (obj)); + } - if (file) - { - ret = g_file_get_uri (file); - g_object_unref (file); + g_object_unref (obj); } return ret; |