[glib: 4/8] Fix signedness warning in glib/gfileutils.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/8] Fix signedness warning in glib/gfileutils.c
- Date: Mon, 18 Oct 2021 14:48:20 +0000 (UTC)
commit 78af147721beb26c3b563e3c6f27345d0ad6affb
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Fri May 14 12:42:01 2021 +0200
Fix signedness warning in glib/gfileutils.c
glib/gfileutils.c: In function 'g_file_test':
glib/gfileutils.c:375:18: warning: comparison of integer expressions of different signedness: 'int' and
'long unsigned int'
if (attributes == INVALID_FILE_ATTRIBUTES)
^~
glib/gfileutils.c: In function 'g_get_current_dir':
glib/gfileutils.c:2882:40: warning: comparison of integer expressions of different signedness: 'DWORD'
{aka 'long unsigned int'} and 'int'
if (GetCurrentDirectoryW (len, wdir) == len - 1)
^~
glib/gfileutils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index 2a0db4f97..92e06ebc8 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -349,7 +349,7 @@ g_file_test (const gchar *filename,
GFileTest test)
{
#ifdef G_OS_WIN32
- int attributes;
+ DWORD attributes;
wchar_t *wfilename;
#endif
@@ -2875,7 +2875,7 @@ g_get_current_dir (void)
gchar *dir = NULL;
wchar_t dummy[2], *wdir;
- int len;
+ DWORD len;
len = GetCurrentDirectoryW (2, dummy);
wdir = g_new (wchar_t, len);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]