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 <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2025-04-04 13:46:39 +01:00
parent 198285bda8
commit 374a274c89
No known key found for this signature in database
GPG Key ID: C5C42CFB268637CA

View File

@ -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);