diff options
author | Emmanuel Fleury <emmanuel.fleury@gmail.com> | 2020-11-17 21:33:48 +0100 |
---|---|---|
committer | Emmanuel Fleury <emmanuel.fleury@gmail.com> | 2021-02-08 10:31:58 +0100 |
commit | 4260193cff934e55cfe2903a4339c86a6d6d683e (patch) | |
tree | 16cd5527967b9413ae3846264b5e2cefe98a0495 | |
parent | fa248f7f71cf4e1658374acb8351efd4cc8d108c (diff) | |
download | glib-4260193cff934e55cfe2903a4339c86a6d6d683e.tar.gz |
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)
| ^
-rw-r--r-- | gio/glocalfileinfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index 4228d3457..94de17057 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -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; |