[glib: 2/3] Fix signedness warning in glib/grand.c




commit 5e0bcbf8fef73ab1675f664c3a705794ad058a4c
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Thu May 13 15:59:31 2021 +0200

    Fix signedness warning in glib/grand.c
    
    glib/grand.c:271:17: warning: comparison of integer expressions of different signedness: 'gint' {aka 
'int'} and 'long long unsigned int'
       for (i = 0; i < G_N_ELEMENTS (seed); i++)
                     ^

 glib/grand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/grand.c b/glib/grand.c
index 3d6dc60f7..a7f5f43fd 100644
--- a/glib/grand.c
+++ b/glib/grand.c
@@ -266,7 +266,7 @@ g_rand_new (void)
    * MinGW-w64 has a wrapper that will emulate rand_s() if it's not in msvcrt
    */
 #if (defined(_MSC_VER) && _MSC_VER >= 1400) || defined(__MINGW64_VERSION_MAJOR)
-  gint i;
+  gsize i;
 
   for (i = 0; i < G_N_ELEMENTS (seed); i++)
     rand_s (&seed[i]);


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