[glib: 2/7] Fix signedness warning in gio/goutputstream.c:g_output_stream_real_writev()




commit 16ee50a59213643f9626aaa639a4bef17479bf66
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Mon Nov 16 23:51:33 2020 +0100

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

 gio/goutputstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/goutputstream.c b/gio/goutputstream.c
index 9e2848e37..8e48803be 100644
--- a/gio/goutputstream.c
+++ b/gio/goutputstream.c
@@ -2344,7 +2344,7 @@ g_output_stream_real_writev (GOutputStream         *stream,
 
       _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]