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: v7.6.2~364 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ca21df6a6a87d49e984b68ad9e1d12e50163231;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 d0b3400d..9fc72c5f 100644 --- a/misc.c +++ b/misc.c @@ -1181,7 +1181,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()));