[glib: 4/6] Fix signedness warning in glib/genviron.c




commit 574842a12e6f09048183529ead1f462ad47908b4
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Fri May 14 11:30:59 2021 +0200

    Fix signedness warning in glib/genviron.c
    
    glib/genviron.c: In function 'g_getenv':
    glib/genviron.c:490:52: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 
'long unsigned int'} and 'int'
       if (GetEnvironmentVariableW (wname, wvalue, len) != len - 1)
                                                        ^~
    glib/genviron.c:507:60: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 
'long unsigned int'} and 'int'
               if (ExpandEnvironmentStringsW (tem, wvalue, len) != len)
                                                                ^~

 glib/genviron.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/genviron.c b/glib/genviron.c
index 04e9ab0a0..44e10d4bd 100644
--- a/glib/genviron.c
+++ b/glib/genviron.c
@@ -454,7 +454,7 @@ g_getenv (const gchar *variable)
   GQuark quark;
   gchar *value;
   wchar_t dummy[2], *wname, *wvalue;
-  int len;
+  DWORD len;
 
   g_return_val_if_fail (variable != NULL, NULL);
   g_return_val_if_fail (g_utf8_validate (variable, -1, NULL), NULL);


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