summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-01-03 15:42:52 +0100
committerLuke from DC <[email protected]>2023-04-21 04:17:47 +0000
commit5e3658eb0b2428a49b47d56300fec73f74f70f4f (patch)
tree5cc24ec4fc203ef1d8e02fa3c827c9b893c7362a
parentf3f71e1589f8276f8177541750a28d8c904a2349 (diff)
downloadmate-menus-5e3658eb0b2428a49b47d56300fec73f74f70f4f.tar.bz2
mate-menus-5e3658eb0b2428a49b47d56300fec73f74f70f4f.tar.xz
matemenu-tree: Fix build warning -Wsign-conversion
-rw-r--r--libmenu/matemenu-tree.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/libmenu/matemenu-tree.c b/libmenu/matemenu-tree.c
index 18816b3..99c51a2 100644
--- a/libmenu/matemenu-tree.c
+++ b/libmenu/matemenu-tree.c
@@ -1904,15 +1904,12 @@ matemenu_tree_item_compare_get_name_helper (MateMenuTreeItem *item,
}
static int
-matemenu_tree_item_compare (MateMenuTreeItem *a,
- MateMenuTreeItem *b,
- gpointer flags_p)
+matemenu_tree_item_compare (MateMenuTreeItem *a,
+ MateMenuTreeItem *b,
+ MateMenuTreeFlags flags)
{
const char *name_a;
const char *name_b;
- MateMenuTreeFlags flags;
-
- flags = GPOINTER_TO_INT (flags_p);
name_a = matemenu_tree_item_compare_get_name_helper (a, flags);
name_b = matemenu_tree_item_compare_get_name_helper (b, flags);
@@ -4515,8 +4512,8 @@ merge_subdirs (MateMenuTree *tree,
directory->subdirs = NULL;
subdirs = g_slist_sort_with_data (subdirs,
- (GCompareDataFunc) matemenu_tree_item_compare,
- GINT_TO_POINTER (MATEMENU_TREE_FLAGS_NONE));
+ (GCompareDataFunc) matemenu_tree_item_compare,
+ (void *) MATEMENU_TREE_FLAGS_NONE);
tmp = subdirs;
while (tmp != NULL)
@@ -4561,7 +4558,7 @@ merge_entries (MateMenuTree *tree,
entries = g_slist_sort_with_data (entries,
(GCompareDataFunc) matemenu_tree_item_compare,
- GINT_TO_POINTER (tree->flags));
+ (void *) tree->flags);
tmp = entries;
while (tmp != NULL)
@@ -4609,8 +4606,8 @@ merge_subdirs_and_entries (MateMenuTree *tree,
directory->entries = NULL;
items = g_slist_sort_with_data (items,
- (GCompareDataFunc) matemenu_tree_item_compare,
- GINT_TO_POINTER (tree->flags));
+ (GCompareDataFunc) matemenu_tree_item_compare,
+ (void *) tree->flags);
tmp = items;
while (tmp != NULL)