From 6a7ef6d170cc902372f56cbf52d5f248a69c86fd Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 18 Oct 2016 13:34:34 +0300 Subject: [PATCH] Workaround 'same expression on both sides of ==' cppcheck style warning * misc.c (GC_init): Do not check sizeof(signed_word) value if CPPCHECK. --- misc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc.c b/misc.c index e57d000..33131bd 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())); -- 2.7.4