diff options
author | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2014-01-01 23:02:48 -0800 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2014-01-01 23:02:48 -0800 |
commit | d0911d130b870da0951b56f5103c6b4dfb9eeb28 (patch) | |
tree | c7f04d6e168ae2e667c9e3da3e36a2b8753fcefc | |
parent | e3fe79502a4a1b0f0b148659948d541ce26ed7bf (diff) |
Use '& 7' instead '% 8' to silence clang analyzer warning
Graphics.c:569:10: warning: The result of the '<<' expression is undefined
while (!QueryFlood(BW, x, y, value) && (x < x_right))
^~~~~~~~~~~~~~~~~~~~~~~~~~~
Graphics.c:470:7: note: expanded from macro 'QueryFlood'
((GetBit(BW->bitmap.image, x, y) !=\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Graphics.c:66:9: note: expanded from macro 'GetBit'
(1 << ((x) % 8))) ? 1 : 0))
~~^~~~~~~~~~~~
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r-- | Graphics.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -69,7 +69,7 @@ from The Open Group. #define GetBit(image, x, y)\ ((bit)((*(image->data + (x) / 8 + (y) * image->bytes_per_line) &\ - (1 << ((x) % 8))) ? 1 : 0)) + (1 << ((x) & 7))) ? 1 : 0)) #if 0 bit |