[glib: 1/8] Fix signedness warning in glib/guri.c




commit f5b2b8132d98b98c855e61fa27c3530be2ada58d
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Sat Nov 14 13:12:09 2020 +0100

    Fix signedness warning in glib/guri.c
    
    glib/guri.c: In function ‘should_normalize_empty_path’:
    glib/guri.c:756:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long 
unsigned int’
      756 |   for (i = 0; i < G_N_ELEMENTS (schemes); ++i)
          |                 ^

 glib/guri.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/guri.c b/glib/guri.c
index ceed7133d..23b8e6dd8 100644
--- a/glib/guri.c
+++ b/glib/guri.c
@@ -752,7 +752,7 @@ static gboolean
 should_normalize_empty_path (const char *scheme)
 {
   const char * const schemes[] = { "https", "http", "wss", "ws" };
-  int i;
+  gsize i;
   for (i = 0; i < G_N_ELEMENTS (schemes); ++i)
     {
       if (!strcmp (schemes[i], scheme))


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