[glib: 3/15] Fix signedness warnings in glib/tests/logging.c




commit 8fc0080b5ea01c72ae64bd7ffaf69cc0e33fe9d4
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Thu Oct 15 10:29:44 2020 +0200

    Fix signedness warnings in glib/tests/logging.c
    
    glib/tests/logging.c: In function ‘compare_fields’:
    glib/tests/logging.c:403:17: error: comparison of integer expressions of different signedness: ‘int’ and 
‘gsize’ {aka ‘long unsigned int’}
      403 |   for (i = 0; i < n1; i++)
          |                 ^
    glib/tests/logging.c:405:21: error: comparison of integer expressions of different signedness: ‘int’ and 
‘gsize’ {aka ‘long unsigned int’}
      405 |       for (j = 0; j < n2; j++)
          |                     ^
    glib/tests/logging.c:410:13: error: comparison of integer expressions of different signedness: ‘int’ and 
‘gsize’ {aka ‘long unsigned int’}
      410 |       if (j == n2)
          |             ^~

 glib/tests/logging.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/tests/logging.c b/glib/tests/logging.c
index f16503ad1..096fe4467 100644
--- a/glib/tests/logging.c
+++ b/glib/tests/logging.c
@@ -398,7 +398,7 @@ compare_field (const GLogField *f1, const GLogField *f2)
 static gboolean
 compare_fields (const GLogField *f1, gsize n1, const GLogField *f2, gsize n2)
 {
-  int i, j;
+  gsize i, j;
 
   for (i = 0; i < n1; i++)
     {


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