[glib: 3/7] Fix signedness warning in gio/gpollableoutputstream.c:g_pollable_output_stream_default_writev_nonblo




commit a39312b14fdb7fce28dbf1a46153c6a7ef370313
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Mon Nov 16 23:54:32 2020 +0100

    Fix signedness warning in 
gio/gpollableoutputstream.c:g_pollable_output_stream_default_writev_nonblocking()
    
    gio/gpollableoutputstream.c: In function ‘g_pollable_output_stream_default_writev_nonblocking’:
    gio/gpollableoutputstream.c:217:15: error: comparison of integer expressions of different signedness: 
‘gssize’ {aka ‘long int’} and ‘gsize’ {aka ‘const long unsigned int’}
      217 |       if (res < vectors[i].size)
          |               ^

 gio/gpollableoutputstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gpollableoutputstream.c b/gio/gpollableoutputstream.c
index c17cf9268..2d3614423 100644
--- a/gio/gpollableoutputstream.c
+++ b/gio/gpollableoutputstream.c
@@ -214,7 +214,7 @@ g_pollable_output_stream_default_writev_nonblocking (GPollableOutputStream  *str
 
       _bytes_written += res;
       /* if we had a short write break the loop here */
-      if (res < vectors[i].size)
+      if ((gsize) res < vectors[i].size)
         break;
     }
 


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