mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
Fix signedness warning in gio/gmenu.c:g_menu_insert_item()
gio/gmenu.c: In function ‘g_menu_insert_item’: gio/gmenu.c:165:32: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} 165 | if (position < 0 || position > menu->items->len) | ^
This commit is contained in:
parent
f598a93332
commit
2174bcf000
@ -162,7 +162,7 @@ g_menu_insert_item (GMenu *menu,
|
||||
g_return_if_fail (G_IS_MENU (menu));
|
||||
g_return_if_fail (G_IS_MENU_ITEM (item));
|
||||
|
||||
if (position < 0 || position > menu->items->len)
|
||||
if (position < 0 || (guint) position > menu->items->len)
|
||||
position = menu->items->len;
|
||||
|
||||
new_item.attributes = g_hash_table_ref (item->attributes);
|
||||
|
Loading…
Reference in New Issue
Block a user