[glib: 14/15] Fix signedness warning in glib/tests/markup-collect.c




commit d29270db6029b297277e77b73e55b70e9a23ca0e
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Thu Oct 15 13:48:20 2020 +0200

    Fix signedness warning in glib/tests/markup-collect.c
    
    glib/tests/markup-collect.c: In function ‘main’:
    glib/tests/markup-collect.c:227:17: error: comparison of integer expressions of different signedness: 
‘int’ and ‘long unsigned int’
      227 |   for (i = 0; i < G_N_ELEMENTS (tests); i++)
          |                 ^

 glib/tests/markup-collect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/tests/markup-collect.c b/glib/tests/markup-collect.c
index dd9b1b4bd..86c12bb84 100644
--- a/glib/tests/markup-collect.c
+++ b/glib/tests/markup-collect.c
@@ -219,14 +219,14 @@ test_cleanup (void)
 int
 main (int argc, char **argv)
 {
-  int i;
+  gsize i;
   gchar *path;
 
   g_test_init (&argc, &argv, NULL);
 
   for (i = 0; i < G_N_ELEMENTS (tests); i++)
     {
-      path = g_strdup_printf ("/markup/collect/%d", i);
+      path = g_strdup_printf ("/markup/collect/%" G_GSIZE_FORMAT, i);
       g_test_add_data_func (path, &tests[i], test_collect);
       g_free (path);
     }


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