[glib: 3/10] Fixing signedness in gdataset.c



commit bfedf0f144a18b82fe9cf649090c41ccb2c488dc
Author: Emmanuel Fleury <emmanuel fleury u-bordeaux fr>
Date:   Sat Jan 26 12:24:23 2019 +0100

    Fixing signedness in gdataset.c
    
    glib/gdataset.c: In function ‘g_datalist_clear_i’:
    glib/gdataset.c:233:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘guint32’ {aka ‘unsigned int’} [-Werror=sign-compare]
           for (i = 0; i < data->len; i++)
                         ^
    glib/gdataset.c: In function ‘g_datalist_clear’:
    glib/gdataset.c:270:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘guint32’ {aka ‘unsigned int’} [-Werror=sign-compare]
           for (i = 0; i < data->len; i++)
                         ^
    glib/gdataset.c: In function ‘g_datalist_foreach’:
    glib/gdataset.c:1147:21: error: comparison of integer expressions of different signedness: ‘int’ and 
‘guint32’ {aka ‘unsigned int’} [-Werror=sign-compare]
           for (j = 0; j < d->len; j++)
                         ^

 glib/gdataset.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/gdataset.c b/glib/gdataset.c
index d7634099d..bfff3e009 100644
--- a/glib/gdataset.c
+++ b/glib/gdataset.c
@@ -222,7 +222,7 @@ static void
 g_datalist_clear_i (GData **datalist)
 {
   GData *data;
-  gint i;
+  guint i;
 
   data = G_DATALIST_GET_POINTER (datalist);
   G_DATALIST_SET_POINTER (datalist, NULL);
@@ -254,7 +254,7 @@ void
 g_datalist_clear (GData **datalist)
 {
   GData *data;
-  gint i;
+  guint i;
 
   g_return_if_fail (datalist != NULL);
 
@@ -1119,7 +1119,7 @@ g_datalist_foreach (GData    **datalist,
                    gpointer         user_data)
 {
   GData *d;
-  int i, j, len;
+  guint i, j, len;
   GQuark *keys;
 
   g_return_if_fail (datalist != NULL);


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