From dd422a058833afa5461668c791071f441cc6ec02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 31 Oct 2022 11:59:39 +0100 Subject: [PATCH] gio/tests/win32-streams: Avoid doing sign casting when we can the offset can be just an unsigned parameter so that we don't have to cast the sizeof (DATA) result. --- gio/tests/win32-streams.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gio/tests/win32-streams.c b/gio/tests/win32-streams.c index 6451a9faa..9c32a56b2 100644 --- a/gio/tests/win32-streams.c +++ b/gio/tests/win32-streams.c @@ -40,7 +40,8 @@ static gpointer writer_thread (gpointer user_data) { GOutputStream *out; - gssize nwrote, offset; + gssize nwrote; + size_t offset; GError *err = NULL; HANDLE out_handle; @@ -58,7 +59,7 @@ writer_thread (gpointer user_data) g_usleep (10); offset = 0; - while (offset < (gssize) sizeof (DATA)) + while (offset < sizeof (DATA)) { nwrote = g_output_stream_write (out, DATA + offset, sizeof (DATA) - offset,