[glib: 3/8] Fix signedness warning in tests/timeloop.c




commit 249f46ac76549a7e2a3ba0032ca0aa09f7832932
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Fri Nov 20 22:11:02 2020 +0100

    Fix signedness warning in tests/timeloop.c
    
    tests/timeloop.c: In function ‘read_all’:
    tests/timeloop.c:41:21: error: comparison of integer expressions of different signedness: ‘gsize’ {aka 
‘long unsigned int’} and ‘int’
       41 |   while (bytes_read < len)
          |                     ^
    tests/timeloop.c: In function ‘write_all’:
    tests/timeloop.c:65:24: error: comparison of integer expressions of different signedness: ‘gsize’ {aka 
‘long unsigned int’} and ‘int’
       65 |   while (bytes_written < len)
          |                        ^

 tests/timeloop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/timeloop.c b/tests/timeloop.c
index 8b5aa3641..40064a140 100644
--- a/tests/timeloop.c
+++ b/tests/timeloop.c
@@ -32,7 +32,7 @@ io_pipe (GIOChannel **channels)
 }
 
 static gboolean
-read_all (GIOChannel *channel, char *buf, int len)
+read_all (GIOChannel *channel, char *buf, gsize len)
 {
   gsize bytes_read = 0;
   gsize count;
@@ -56,7 +56,7 @@ read_all (GIOChannel *channel, char *buf, int len)
 }
 
 static gboolean
-write_all (GIOChannel *channel, char *buf, int len)
+write_all (GIOChannel *channel, char *buf, gsize len)
 {
   gsize bytes_written = 0;
   gsize count;


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