[glib: 5/7] Fix several signedness warnings in gio/tests/actions.c




commit 00323ac0e1e157fbc4eab27f8641cd5f72dea9ee
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Thu Nov 19 00:58:38 2020 +0100

    Fix several signedness warnings in gio/tests/actions.c
    
    gio/tests/actions.c: In function ‘strv_set_equal’:
    gio/tests/actions.c:177:41: error: comparison of integer expressions of different signedness: ‘guint’ 
{aka ‘unsigned int’} and ‘gint’ {aka ‘int’}
      177 |     res = g_strv_length ((gchar**)strv) == count;
          |                                         ^~
    gio/tests/actions.c: In function ‘test_parse_detailed’:
    gio/tests/actions.c:473:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘long unsigned int’
      473 |   for (i = 0; i < G_N_ELEMENTS (testcases); i++)
          |                 ^

 gio/tests/actions.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/tests/actions.c b/gio/tests/actions.c
index 27dee7fd8..91fc08074 100644
--- a/gio/tests/actions.c
+++ b/gio/tests/actions.c
@@ -151,7 +151,7 @@ strv_strv_cmp (gchar **a, gchar **b)
 static gboolean
 strv_set_equal (gchar **strv, ...)
 {
-  gint count;
+  guint count;
   va_list list;
   const gchar *str;
   gboolean res;
@@ -468,7 +468,7 @@ test_parse_detailed (void)
     { "abc(42, 4)",       "abc",    "(42, 4)",  "expected end of input", NULL },
     { "abc(42,)",         "abc",    "(42,)",    "expected end of input", NULL }
   };
-  gint i;
+  gsize i;
 
   for (i = 0; i < G_N_ELEMENTS (testcases); i++)
     {


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