[glib: 2/6] Fix signedness warning in gio/gliststore.c:




commit fc8062d9060acc3b6d6093f1fff289ea9bbff3f3
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Mon Nov 16 17:36:00 2020 +0100

    Fix signedness warning in gio/gliststore.c:
    
    gio/gliststore.c: In function ‘g_list_store_insert’:
    gio/gliststore.c:272:30: error: comparison of integer expressions of different signedness: ‘guint’ {aka 
‘unsigned int’} and ‘gint’ {aka ‘int’}
      272 |   g_return_if_fail (position <= g_sequence_get_length (store->items));
          |                              ^~

 gio/gliststore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gliststore.c b/gio/gliststore.c
index 29dc3fd51..da7d12ce5 100644
--- a/gio/gliststore.c
+++ b/gio/gliststore.c
@@ -269,7 +269,7 @@ g_list_store_insert (GListStore *store,
 
   g_return_if_fail (G_IS_LIST_STORE (store));
   g_return_if_fail (g_type_is_a (G_OBJECT_TYPE (item), store->item_type));
-  g_return_if_fail (position <= g_sequence_get_length (store->items));
+  g_return_if_fail (position <= (guint) g_sequence_get_length (store->items));
 
   it = g_sequence_get_iter_at_pos (store->items, position);
   g_sequence_insert_before (it, g_object_ref (item));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]