mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 03:46:17 +01:00
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); | ^~~
This commit is contained in:
parent
8045b77c32
commit
5444b7e74d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user