From d2b9489594cde6024626c960697a2051e23169bb Mon Sep 17 00:00:00 2001 From: Mitya Selivanov <0x7fffff@guattari.ru> Date: Wed, 31 Aug 2022 03:04:45 +0400 Subject: test --- source/test/unittests/atomic.test.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/test/unittests') diff --git a/source/test/unittests/atomic.test.c b/source/test/unittests/atomic.test.c index 8f6d22b..24cadca 100644 --- a/source/test/unittests/atomic.test.c +++ b/source/test/unittests/atomic.test.c @@ -83,7 +83,8 @@ TEST("atomic byte concurrency") { thrd_t threads[THREAD_COUNT]; for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) - thrd_create(threads + i, test_8_, (i % 2) ? &foo : &bar); + thrd_create(threads + i, test_8_, + (void *) ((i % 2) ? &foo : &bar)); for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) thrd_join(threads[i], NULL); @@ -113,7 +114,8 @@ TEST("atomic int16 concurrency") { thrd_t threads[THREAD_COUNT]; for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) - thrd_create(threads + i, test_16_, (i % 2) ? &foo : &bar); + thrd_create(threads + i, test_16_, + (void *) ((i % 2) ? &foo : &bar)); for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) thrd_join(threads[i], NULL); @@ -143,7 +145,8 @@ TEST("atomic int32 concurrency") { thrd_t threads[THREAD_COUNT]; for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) - thrd_create(threads + i, test_32_, (i % 2) ? &foo : &bar); + thrd_create(threads + i, test_32_, + (void *) ((i % 2) ? &foo : &bar)); for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) thrd_join(threads[i], NULL); @@ -176,7 +179,8 @@ TEST("atomic int64 concurrency") { thrd_t threads[THREAD_COUNT]; for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) - thrd_create(threads + i, test_64_, (i % 2) ? &foo : &bar); + thrd_create(threads + i, test_64_, + (void *) ((i % 2) ? &foo : &bar)); for (ptrdiff_t i = 0; i < THREAD_COUNT; i++) thrd_join(threads[i], NULL); -- cgit v1.2.3