[glib: 1/7] Fix signedness warning in glib/gstring.c




commit 8ad4f752b1a821ebe09bd3381080da81eb6c22f6
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Sun Feb 21 10:15:19 2021 +0100

    Fix signedness warning in glib/gstring.c
    
    glib/gstring.c: In function ‘g_string_replace’:
    glib/gstring.c:998:13: warning: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘guint’ {aka ‘unsigned int’}
      998 |       if (n == limit)
          |             ^~

 glib/gstring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gstring.c b/glib/gstring.c
index 030d75316..caf338b3a 100644
--- a/glib/gstring.c
+++ b/glib/gstring.c
@@ -978,7 +978,7 @@ g_string_replace (GString     *string,
 {
   gsize f_len, r_len, pos;
   gchar *cur, *next;
-  gint n = 0;
+  guint n = 0;
 
   g_return_val_if_fail (string != NULL, 0);
   g_return_val_if_fail (find != NULL, 0);


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