mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
Fix signedness warnings in glib/gstdio.c
glib/gstdio.c: In function '_g_win32_stat_utf8': glib/gstdio.c:763:45: warning: comparison of integer expressions of different signedness: 'gsize' {aka 'long long unsigned int'} and 'long long int' (g_path_is_absolute (filename) && len <= g_path_skip_root (filename) - filename)) ^~ glib/gstdio.c: In function 'g_win32_readlink_utf8': glib/gstdio.c:896:15: warning: comparison of integer expressions of different signedness: 'glong' {aka 'long int'} and 'gsize' {aka 'long long unsigned int'} if (tmp_len > buf_size) ^
This commit is contained in:
parent
b89967a14d
commit
928be8b8bc
@ -760,7 +760,7 @@ _g_win32_stat_utf8 (const gchar *filename,
|
||||
len--;
|
||||
|
||||
if (len <= 0 ||
|
||||
(g_path_is_absolute (filename) && len <= g_path_skip_root (filename) - filename))
|
||||
(g_path_is_absolute (filename) && len <= (gsize) (g_path_skip_root (filename) - filename)))
|
||||
len = strlen (filename);
|
||||
|
||||
wfilename = g_utf8_to_utf16 (filename, len, NULL, NULL, NULL);
|
||||
@ -893,7 +893,7 @@ g_win32_readlink_utf8 (const gchar *filename,
|
||||
return tmp_len;
|
||||
}
|
||||
|
||||
if (tmp_len > buf_size)
|
||||
if ((gsize) tmp_len > buf_size)
|
||||
tmp_len = buf_size;
|
||||
|
||||
memcpy (buf, tmp, tmp_len);
|
||||
|
Loading…
Reference in New Issue
Block a user