[glib: 4/6] Fix signedness warning in gio/gdatainputstream.c:scan_for_chars()




commit f606e3350e944057d0489b26a8d3e0362d5771d4
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Mon Nov 16 20:43:43 2020 +0100

    Fix signedness warning in gio/gdatainputstream.c:scan_for_chars()
    
    gio/gdatainputstream.c: In function ‘scan_for_chars’:
    gio/gdatainputstream.c:879:40: error: comparison of integer expressions of different signedness: ‘int’ 
and ‘gsize’ {aka ‘long unsigned int’}
      879 |   for (i = 0; checked < available && i < peeked; i++)
          |                                        ^

 gio/gdatainputstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gdatainputstream.c b/gio/gdatainputstream.c
index 1c7a5bef2..4440eb41f 100644
--- a/gio/gdatainputstream.c
+++ b/gio/gdatainputstream.c
@@ -861,7 +861,7 @@ scan_for_chars (GDataInputStream *stream,
   GBufferedInputStream *bstream;
   const char *buffer;
   gsize start, end, peeked;
-  int i;
+  gsize i;
   gsize available, checked;
   const char *stop_char;
   const char *stop_end;


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