summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-01-03 15:42:52 +0100
committerrbuj <[email protected]>2022-01-03 15:53:34 +0100
commit6f06f698e7fada8832831c729d41fcca98b3cebd (patch)
tree56ed50dcf359f29c4680b09bb425c5c18d406c9a
parentad5341cb6361326aceeac63580230d74d7df0bba (diff)
downloadmate-menus-sign-conversion.tar.bz2
mate-menus-sign-conversion.tar.xz
matemenu-tree: Fix build warning -Wsign-conversionsign-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 8e76047..8406041 100644
--- a/libmenu/matemenu-tree.c
+++ b/libmenu/matemenu-tree.c
@@ -1914,15 +1914,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);
@@ -4528,8 +4525,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)
@@ -4574,7 +4571,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)
@@ -4622,8 +4619,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)