From 2aefed885364c98605aac544ed89e046627c21cb Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 9 Mar 2017 07:30:35 +0300 Subject: [PATCH] Workaround 'shifting 32-bit value by 32 bits undefined' cppcheck warning * src/atomic_ops_malloc.c [__SIZEOF_SIZE_T__==8] (msb): Ignore by CPPCHECK. --- src/atomic_ops_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atomic_ops_malloc.c b/src/atomic_ops_malloc.c index 499b145..77faa4e 100644 --- a/src/atomic_ops_malloc.c +++ b/src/atomic_ops_malloc.c @@ -251,7 +251,7 @@ static unsigned msb(size_t s) { unsigned result = 0; if ((s & 0xff) != s) { -# if __SIZEOF_SIZE_T__ == 8 +# if (__SIZEOF_SIZE_T__ == 8) && !defined(CPPCHECK) unsigned v = (unsigned)(s >> 32); if (v != 0) { -- 2.40.0