From: Ivan Maidanski Date: Sat, 17 Dec 2016 15:43:00 +0000 (+0300) Subject: Workaround 'value of AO_compiler_barrier unknown' cppcheck info message X-Git-Tag: v8.0.0~980 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1586a21db3ed00b854f037950ef856f9a082c48d;p=platform%2Fupstream%2Flibgc.git Workaround 'value of AO_compiler_barrier unknown' cppcheck info message (fix commit e3ec4a5) * mark.c (GC_noop6): Call AO_compiler_barrier() only if PARALLEL_MARK or GC_PTHREADS and not GC_WIN32_THREADS (do not use "#ifdef AO_compiler_barrier"). --- diff --git a/mark.c b/mark.c index dec761b..36b39e5 100644 --- a/mark.c +++ b/mark.c @@ -30,7 +30,8 @@ void GC_noop6(word arg1 GC_ATTR_UNUSED, word arg2 GC_ATTR_UNUSED, word arg5 GC_ATTR_UNUSED, word arg6 GC_ATTR_UNUSED) { /* Avoid GC_noop6 calls to be optimized away. */ -# ifdef AO_compiler_barrier +# if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) \ + || defined(PARALLEL_MARK) AO_compiler_barrier(); /* to serve as a special side-effect */ # else GC_noop1(0);