]> granicus.if.org Git - gc/commitdiff
Eliminate 'conversion from size_t to int' MSVC warning in subthread_create
authorIvan Maidanski <ivmai@mail.ru>
Wed, 21 Aug 2019 08:08:11 +0000 (11:08 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 21 Aug 2019 08:10:07 +0000 (11:10 +0300)
(fix of commit 0ccf1379e)

* tests/subthread_create.c [AO_HAVE_fetch_and_add1] (entry): Cast
result of AO_fetch_and_add1() to int explicitly.

tests/subthread_create.c

index a40df51cbc44eb49c3ecd88547df611a992e8c76..2b3b4604973b2427e829e22470dab33cdc1a3d2f 100644 (file)
@@ -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