From 374a274c89267e078a636220c2db789d4d50fab3 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 4 Apr 2025 13:46:39 +0100 Subject: [PATCH] tests: Fix a size_t-to-int32 conversion warning on Windows Spotted while looking at CI output for the previous commit, and I thought I might as well fix it while I was there. Signed-off-by: Philip Withnall --- glib/tests/rec-mutex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glib/tests/rec-mutex.c b/glib/tests/rec-mutex.c index 983886f26..9cb529ab2 100644 --- a/glib/tests/rec-mutex.c +++ b/glib/tests/rec-mutex.c @@ -138,9 +138,10 @@ thread_func (gpointer user_data) GRand *rand; rand = g_rand_new (); + g_assert (data->n_locks <= G_MAXINT32); for (unsigned int i = 0; i < data->n_iterations; i++) - acquire (data, g_rand_int_range (rand, 0, data->n_locks)); + acquire (data, g_rand_int_range (rand, 0, (gint32) data->n_locks)); g_rand_free (rand);