From: Ivan Maidanski Date: Wed, 9 Sep 2015 20:55:37 +0000 (+0300) Subject: Fix 'cast to pointer from integer' warning in GC_on_thread_event (64-bit) X-Git-Tag: gc7_6_0~147 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4696bd8afeb4098458538a04bd858d8d28f1a68;p=platform%2Fupstream%2Flibgc.git Fix 'cast to pointer from integer' warning in GC_on_thread_event (64-bit) * pthread_stop_world.c (GC_suspend_all, GC_start_world): Cast thread_id to pointer via word type on passing to GC_on_thread_event; add comment. --- diff --git a/pthread_stop_world.c b/pthread_stop_world.c index c6d4915..84b787c 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -529,7 +529,8 @@ STATIC int GC_suspend_all(void) case 0: if (GC_on_thread_event) GC_on_thread_event(GC_EVENT_THREAD_SUSPENDED, - (void *)thread_id); + (void *)(word)thread_id); + /* Note: thread_id might be truncated. */ break; default: ABORT_ARG1("pthread_kill failed at suspend", @@ -866,7 +867,7 @@ GC_INNER void GC_start_world(void) case 0: if (GC_on_thread_event) GC_on_thread_event(GC_EVENT_THREAD_UNSUSPENDED, - (void *)thread_id); + (void *)(word)thread_id); break; default: ABORT_ARG1("pthread_kill failed at resume",