Fix signedness warning in gio/gmenu.c:g_menu_remove()

gio/gmenu.c: In function ‘g_menu_remove’:
gio/gmenu.c:483:47: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
  483 |   g_return_if_fail (0 <= position && position < menu->items->len);
      |                                               ^
This commit is contained in:
Emmanuel Fleury 2020-11-17 21:47:59 +01:00
parent 2174bcf000
commit 7c32b1173a

View File

@ -480,7 +480,7 @@ g_menu_remove (GMenu *menu,
gint position)
{
g_return_if_fail (G_IS_MENU (menu));
g_return_if_fail (0 <= position && position < menu->items->len);
g_return_if_fail (0 <= position && (guint) position < menu->items->len);
g_menu_clear_item (&g_array_index (menu->items, struct item, position));
g_array_remove_index (menu->items, position);