From: Ivan Maidanski Date: Tue, 18 Oct 2016 10:34:34 +0000 (+0300) Subject: Workaround 'same expression on both sides of ==' cppcheck style warning X-Git-Tag: v8.0.0~1095 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a7ef6d170cc902372f56cbf52d5f248a69c86fd;p=gc Workaround 'same expression on both sides of ==' cppcheck style warning * misc.c (GC_init): Do not check sizeof(signed_word) value if CPPCHECK. --- diff --git a/misc.c b/misc.c index e57d0008..33131bd7 100644 --- a/misc.c +++ b/misc.c @@ -1184,7 +1184,9 @@ GC_API void GC_CALL GC_init(void) } # endif GC_STATIC_ASSERT(sizeof (ptr_t) == sizeof(word)); - GC_STATIC_ASSERT(sizeof (signed_word) == sizeof(word)); +# if !defined(CPPCHECK) + GC_STATIC_ASSERT(sizeof(signed_word) == sizeof(word)); +# endif GC_STATIC_ASSERT(sizeof (struct hblk) == HBLKSIZE); # ifndef THREADS GC_ASSERT(!((word)GC_stackbottom HOTTER_THAN (word)GC_approx_sp()));