From: Ivan Maidanski Date: Wed, 12 Sep 2012 05:46:41 +0000 (+0400) Subject: Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads) X-Git-Tag: gc7_4_0~209 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd7027e6bea0e9d1894d9d79d64a838069bf3e26;p=gc Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads) * pthread_stop_world.c (GC_stop_world): Eliminate "assigned value never used" compiler warning for "code" local variable in conditional statement checking sem_wait result. --- diff --git a/pthread_stop_world.c b/pthread_stop_world.c index a0132030..d9231b4a 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -620,7 +620,8 @@ GC_INNER void GC_stop_world(void) for (i = 0; i < n_live_threads; i++) { retry: - if (0 != (code = sem_wait(&GC_suspend_ack_sem))) { + code = sem_wait(&GC_suspend_ack_sem); + if (0 != code) { /* On Linux, sem_wait is documented to always return zero. */ /* But the documentation appears to be incorrect. */ if (errno == EINTR) {