[glib: 3/8] Fix signedness warnings in glib/tests/slice.c




commit f4bfc50db380ad63c45e10ea5ad1c587fda58c2b
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Sat Nov 14 13:17:11 2020 +0100

    Fix signedness warnings in glib/tests/slice.c
    
    glib/tests/slice.c: In function ‘test_allocate’:
    glib/tests/slice.c:146:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘long unsigned int’
      146 |   for (i = 0; i < G_N_ELEMENTS(threads); i++)
          |                 ^
    glib/tests/slice.c:149:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘long unsigned int’
      149 |   for (i = 0; i < G_N_ELEMENTS(threads); i++)
          |                 ^

 glib/tests/slice.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/tests/slice.c b/glib/tests/slice.c
index b0ad3da66..f37826f3a 100644
--- a/glib/tests/slice.c
+++ b/glib/tests/slice.c
@@ -137,7 +137,7 @@ test_allocate (void)
 {
   GThread *threads[30];
   gint size;
-  gint i;
+  gsize i;
 
   for (i = 0; i < 30; i++)
     for (size = 1; size <= 4096; size++)


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