[glib: 7/8] Fix several signedness warnings in glib/tests/timer.c




commit 766e6325aca2630e877d12be669ee4443c4566ea
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Sat Nov 14 13:42:41 2020 +0100

    Fix several signedness warnings in glib/tests/timer.c
    
    glib/tests/timer.c: In function ‘test_timeval_from_iso8601’:
    glib/tests/timer.c:220:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘long unsigned int’
      220 |   for (i = 0; i < G_N_ELEMENTS (tests); i++)
          |                 ^
    glib/tests/timer.c: In function ‘test_timeval_to_iso8601’:
    glib/tests/timer.c:260:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘long unsigned int’
      260 |   for (i = 0; i < G_N_ELEMENTS (tests); i++)
          |                 ^

 glib/tests/timer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/tests/timer.c b/glib/tests/timer.c
index 149b3af4b..e805ef581 100644
--- a/glib/tests/timer.c
+++ b/glib/tests/timer.c
@@ -208,7 +208,7 @@ test_timeval_from_iso8601 (void)
   };
   GTimeVal out;
   gboolean success;
-  gint i;
+  gsize i;
 
   /* Always run in UTC so the comparisons of parsed values are valid. */
   if (!g_setenv ("TZ", "UTC", TRUE))
@@ -250,7 +250,7 @@ test_timeval_to_iso8601 (void)
     { { 657454877, 0 }, "1990-11-01T10:21:17Z" },
     { { 17, 123400 }, "1970-01-01T00:00:17.123400Z" }
   };
-  gint i;
+  gsize i;
   gchar *out;
   GTimeVal val;
   gboolean ret;


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