diff options
author | Emmanuel Fleury <emmanuel.fleury@gmail.com> | 2020-11-20 20:29:28 +0100 |
---|---|---|
committer | Emmanuel Fleury <emmanuel.fleury@gmail.com> | 2021-04-29 12:40:05 +0200 |
commit | 4ad62f7fab017e3562256d82971ab9fdf13fb81b (patch) | |
tree | f42dc560f3f2f2aa6b8544564eb20f5ef66b786f | |
parent | a9652620045172cafd2f863df8b3260ccde6b469 (diff) | |
download | glib-4ad62f7fab017e3562256d82971ab9fdf13fb81b.tar.gz |
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);
| ^~
-rw-r--r-- | gio/tests/readwrite.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gio/tests/readwrite.c b/gio/tests/readwrite.c index 2aa925b30..7551e5384 100644 --- a/gio/tests/readwrite.c +++ b/gio/tests/readwrite.c @@ -32,6 +32,7 @@ static void verify_iostream (GFileIOStream *file_iostream) { gboolean res; + gssize skipped; GIOStream *iostream; GError *error; GInputStream *in; @@ -73,8 +74,9 @@ verify_iostream (GFileIOStream *file_iostream) g_assert (res == 5); verify_pos (iostream, 15); - res = g_input_stream_skip (in, 10000, NULL, NULL); - g_assert (res == strlen (original_data) - 15); + skipped = g_input_stream_skip (in, 10000, NULL, NULL); + g_assert_cmpint (skipped, >=, 0); + g_assert ((gsize) skipped == strlen (original_data) - 15); verify_pos (iostream, strlen (original_data)); res = g_seekable_seek (G_SEEKABLE (iostream), |