[glib: 3/7] Fix signedness warnings in tests/gobject/timeloop-closure.c




commit 7ddcc082e2e637cd85a16be386c08e5ec47d5561
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Fri Nov 20 21:36:53 2020 +0100

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

 tests/gobject/timeloop-closure.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/gobject/timeloop-closure.c b/tests/gobject/timeloop-closure.c
index c904c2a45..51dd6f105 100644
--- a/tests/gobject/timeloop-closure.c
+++ b/tests/gobject/timeloop-closure.c
@@ -33,7 +33,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;
@@ -57,7 +57,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]