projects
/
platform
/
upstream
/
libatomic_ops.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
465d09a
)
Workaround 'shifting 32-bit value by 32 bits undefined' cppcheck warning
author
Ivan Maidanski
<ivmai@mail.ru>
Thu, 9 Mar 2017 04:30:35 +0000
(07:30 +0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Thu, 9 Mar 2017 04:30:35 +0000
(07:30 +0300)
* src/atomic_ops_malloc.c [__SIZEOF_SIZE_T__==8] (msb): Ignore by
CPPCHECK.
src/atomic_ops_malloc.c
patch
|
blob
|
history
diff --git
a/src/atomic_ops_malloc.c
b/src/atomic_ops_malloc.c
index
499b145
..
77faa4e
100644
(file)
--- 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)
{