mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-15 04:05:11 +01:00
Fix signedness warning in gio/tests/readwrite.c
gio/tests/readwrite.c: In function ‘verify_iostream’: gio/tests/readwrite.c:77:17: error: comparison of integer expressions of different signedness: ‘gboolean’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} 77 | g_assert (res == strlen (original_data) - 15); | ^~
This commit is contained in:
parent
a965262004
commit
4ad62f7fab
@ -32,6 +32,7 @@ static void
|
|||||||
verify_iostream (GFileIOStream *file_iostream)
|
verify_iostream (GFileIOStream *file_iostream)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
gssize skipped;
|
||||||
GIOStream *iostream;
|
GIOStream *iostream;
|
||||||
GError *error;
|
GError *error;
|
||||||
GInputStream *in;
|
GInputStream *in;
|
||||||
@ -73,8 +74,9 @@ verify_iostream (GFileIOStream *file_iostream)
|
|||||||
g_assert (res == 5);
|
g_assert (res == 5);
|
||||||
verify_pos (iostream, 15);
|
verify_pos (iostream, 15);
|
||||||
|
|
||||||
res = g_input_stream_skip (in, 10000, NULL, NULL);
|
skipped = g_input_stream_skip (in, 10000, NULL, NULL);
|
||||||
g_assert (res == strlen (original_data) - 15);
|
g_assert_cmpint (skipped, >=, 0);
|
||||||
|
g_assert ((gsize) skipped == strlen (original_data) - 15);
|
||||||
verify_pos (iostream, strlen (original_data));
|
verify_pos (iostream, strlen (original_data));
|
||||||
|
|
||||||
res = g_seekable_seek (G_SEEKABLE (iostream),
|
res = g_seekable_seek (G_SEEKABLE (iostream),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user