[glib: 2/7] Fix signedness warnings in tests/refcount/objects.c




commit 7c69a1d5f674cb0bd5aa08ce4c759b0068e385f1
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Fri Nov 20 21:32:47 2020 +0100

    Fix signedness warnings in tests/refcount/objects.c
    
    tests/refcount/objects.c: In function ‘main’:
    tests/refcount/objects.c:133:17: error: comparison of integer expressions of different signedness: ‘gint’ 
{aka ‘int’} and ‘guint’ {aka ‘const unsigned int’}
      133 |   for (i = 0; i < n_threads; i++) {
          |                 ^
    tests/refcount/objects.c:149:17: error: comparison of integer expressions of different signedness: ‘gint’ 
{aka ‘int’} and ‘unsigned int’
      149 |   for (i = 0; i < 2 * n_threads; i++) {
          |                 ^

 tests/refcount/objects.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/refcount/objects.c b/tests/refcount/objects.c
index 0c471a42b..06b871936 100644
--- a/tests/refcount/objects.c
+++ b/tests/refcount/objects.c
@@ -115,7 +115,7 @@ run_thread (GTest * test)
 int
 main (int argc, char **argv)
 {
-  gint i;
+  guint i;
   GTest *test1, *test2;
   GArray *test_threads;
   const guint n_threads = 5;


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