From: Ivan Maidanski Date: Wed, 21 Aug 2019 08:08:11 +0000 (+0300) Subject: Eliminate 'conversion from size_t to int' MSVC warning in subthread_create X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5bd4c897a97015c9feeb0af84febd2ed7261ee96;p=gc Eliminate 'conversion from size_t to int' MSVC warning in subthread_create (fix of commit 0ccf1379e) * tests/subthread_create.c [AO_HAVE_fetch_and_add1] (entry): Cast result of AO_fetch_and_add1() to int explicitly. --- diff --git a/tests/subthread_create.c b/tests/subthread_create.c index a40df51c..2b3b4604 100644 --- a/tests/subthread_create.c +++ b/tests/subthread_create.c @@ -58,7 +58,7 @@ volatile AO_t thread_ended_cnt = 0; DWORD WINAPI entry(LPVOID arg) #endif { - int thread_num = AO_fetch_and_add1(&thread_created_cnt); + int thread_num = (int)AO_fetch_and_add1(&thread_created_cnt); GC_word my_depth = (GC_word)arg + 1; if (my_depth <= MAX_SUBTHREAD_DEPTH