[glib: 13/15] Fix signedness warning in glib/tests/scannerapi.c




commit a7fdca46e7b91ef13475b3e97e56ea6f43a955be
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Thu Oct 15 13:34:33 2020 +0200

    Fix signedness warning in glib/tests/scannerapi.c
    
    glib/tests/scannerapi.c: In function ‘test_scanner_tokens’:
    glib/tests/scannerapi.c:124:17: error: comparison of integer expressions of different signedness: ‘guint’ 
{aka ‘unsigned int’} and ‘gint’ {aka ‘const int’}
      124 |   for (i = 1; i < tokbuflen; i++)
          |                 ^

 glib/tests/scannerapi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/tests/scannerapi.c b/glib/tests/scannerapi.c
index a8c6879d3..6813184cf 100644
--- a/glib/tests/scannerapi.c
+++ b/glib/tests/scannerapi.c
@@ -111,8 +111,8 @@ test_scanner_tokens (ScannerFixture *fix,
   gchar buf[] = "(\t\n\r\\){}";
   const gint buflen = strlen (buf);
   gchar tokbuf[] = "(\\){}";
-  const gint tokbuflen = strlen (tokbuf);
-  guint i;
+  const gsize tokbuflen = strlen (tokbuf);
+  gsize i;
 
   g_scanner_input_text (fix->scanner, buf, buflen);
 


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