mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-02 09:16:17 +01:00
Fix signedness warning in gio/glocalfileinfo.c:read_link()
gio/glocalfileinfo.c: In function ‘read_link’: gio/glocalfileinfo.c:188:21: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} 188 | if (read_size < size) | ^
This commit is contained in:
parent
fa248f7f71
commit
4260193cff
@ -170,14 +170,14 @@ read_link (const gchar *full_name)
|
||||
{
|
||||
#if defined (HAVE_READLINK)
|
||||
gchar *buffer;
|
||||
guint size;
|
||||
gsize size;
|
||||
|
||||
size = 256;
|
||||
buffer = g_malloc (size);
|
||||
|
||||
while (1)
|
||||
{
|
||||
int read_size;
|
||||
gssize read_size;
|
||||
|
||||
read_size = readlink (full_name, buffer, size);
|
||||
if (read_size < 0)
|
||||
@ -185,7 +185,7 @@ read_link (const gchar *full_name)
|
||||
g_free (buffer);
|
||||
return NULL;
|
||||
}
|
||||
if (read_size < size)
|
||||
if ((gsize) read_size < size)
|
||||
{
|
||||
buffer[read_size] = 0;
|
||||
return buffer;
|
||||
|
Loading…
Reference in New Issue
Block a user