[glib: 4/6] Fix signedness warning in gio/gmenu.c:g_menu_remove()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/6] Fix signedness warning in gio/gmenu.c:g_menu_remove()
- Date: Tue, 9 Feb 2021 10:45:53 +0000 (UTC)
commit 7c32b1173ac95f73be735cbaa8c444d0c8177ed8
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Tue Nov 17 21:47:59 2020 +0100
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);
| ^
gio/gmenu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gmenu.c b/gio/gmenu.c
index c067c7fe7..2c8c6c93f 100644
--- a/gio/gmenu.c
+++ b/gio/gmenu.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]