From bca126324d161bf3fdbe97bbe923b45d1a322696 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 9 Mar 2017 23:48:45 +0300 Subject: [PATCH] Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings * include/private/gcconfig.h [CPPCHECK] (CPP_WORDSZ): Undefine (platform-specific explicit value) and redefine to __SIZEOF_POINTER__*8. --- include/private/gcconfig.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 2bf4607..331e25a 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2786,6 +2786,11 @@ # define UNIX_LIKE /* Basic Unix-like system calls work. */ #endif +#if defined(CPPCHECK) +# undef CPP_WORDSZ +# define CPP_WORDSZ (__SIZEOF_POINTER__ * 8) +#endif + #if CPP_WORDSZ != 32 && CPP_WORDSZ != 64 # error --> bad word size #endif -- 2.7.4