[glib: 6/7] Fix signedness warnings in gobject/gobject.c:g_object_new_internal()




commit 236d6281b829a1c2f71a90915c6c1c2a3edd68a5
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Mon Nov 16 16:50:52 2020 +0100

    Fix signedness warnings in gobject/gobject.c:g_object_new_internal()
    
    gobject/gobject.c: In function ‘g_object_new_internal’:
    gobject/gobject.c:1962:25: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘guint’ {aka ‘unsigned int’}
     1962 |           for (j = 0; j < n_params; j++)
          |                         ^
    gobject/gobject.c:1989:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘guint’ {aka ‘unsigned int’}
     1989 |       for (i = 0; i < n_params; i++)
          |                     ^

 gobject/gobject.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 36dd2e940..056d5c589 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -1954,7 +1954,7 @@ g_object_new_internal (GObjectClass          *class,
         {
           const GValue *value;
           GParamSpec *pspec;
-          gint j;
+          guint j;
 
           pspec = node->data;
           value = NULL; /* to silence gcc... */
@@ -1980,7 +1980,7 @@ g_object_new_internal (GObjectClass          *class,
 
   if (nqueue)
     {
-      gint i;
+      guint i;
 
       /* Set remaining properties.  The construct properties will
        * already have been taken, so set only the non-construct


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