diff options
author | Emmanuel Fleury <emmanuel.fleury@gmail.com> | 2020-11-08 22:37:53 +0100 |
---|---|---|
committer | Emmanuel Fleury <emmanuel.fleury@gmail.com> | 2020-11-13 10:13:49 +0100 |
commit | 5444b7e74d3574a0ef800318a50148532bffea48 (patch) | |
tree | 97ed05ae8fddbcc2bd7a030483143b70ad3e3e3e | |
parent | 8045b77c323370b15e7c6e9812daff2e85b4182b (diff) | |
download | glib-5444b7e74d3574a0ef800318a50148532bffea48.tar.gz |
Fixing signedness warning in glib/tests/mainloop.c
glib/tests/mainloop.c: In function ‘write_bytes’:
glib/gmacros.h:809:26: error: comparison of integer expressions of different signedness: ‘gssize’ {aka ‘long int’} and ‘long unsigned int’
809 | #define MIN(a, b) (((a) < (b)) ? (a) : (b))
| ^
glib/tests/mainloop.c:1146:11: note: in expansion of macro ‘MIN’
1146 | limit = MIN (*to_write, sizeof zeros);
| ^~~
-rw-r--r-- | glib/tests/mainloop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c index efc896ccf..5cdb2a467 100644 --- a/glib/tests/mainloop.c +++ b/glib/tests/mainloop.c @@ -1143,7 +1143,7 @@ write_bytes (gint fd, /* Detect if we run before we should */ g_assert_cmpint (*to_write, >=, 0); - limit = MIN (*to_write, sizeof zeros); + limit = MIN ((gsize) *to_write, sizeof zeros); *to_write -= write (fd, zeros, limit); return TRUE; |