]> granicus.if.org Git - gc/commitdiff
Workaround 'GCC_ATOMIC_TEST_AND_SET_TRUEVAL unknown' cppcheck info message
authorIvan Maidanski <ivmai@mail.ru>
Mon, 10 Jul 2017 21:41:53 +0000 (00:41 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 10 Jul 2017 21:41:53 +0000 (00:41 +0300)
(fix commit 46a2411)

* include/private/gc_atomic_ops.h [__GCC_ATOMIC_TEST_AND_SET_TRUEVAL]
(AO_TS_SET): Do not use __GCC_ATOMIC_TEST_AND_SET_TRUEVAL if CPPCHECK.

include/private/gc_atomic_ops.h

index 2cf45f9a6e0a917f19d72fc3b5b2a7e980431d7f..adb131a583df2db41264a58811163c82c4927aad 100644 (file)
@@ -34,7 +34,7 @@
   typedef unsigned char AO_TS_t;
 # define AO_TS_CLEAR 0
 # define AO_TS_INITIALIZER (AO_TS_t)AO_TS_CLEAR
-# ifdef __GCC_ATOMIC_TEST_AND_SET_TRUEVAL
+# if defined(__GCC_ATOMIC_TEST_AND_SET_TRUEVAL) && !defined(CPPCHECK)
 #   define AO_TS_SET __GCC_ATOMIC_TEST_AND_SET_TRUEVAL
 # else
 #   define AO_TS_SET (AO_TS_t)0xff