summaryrefslogtreecommitdiff
path: root/src/lib/lzmadecode.c
diff options
context:
space:
mode:
authorPaul Menzel <paulepanter@users.sourceforge.net>2018-03-30 10:25:56 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-04-09 09:44:15 +0000
commitd538dd1fe70a333c929a2eb7c4106608bcd05257 (patch)
tree331d462ad49e22dd78c12a75817b8ede3eaac169 /src/lib/lzmadecode.c
parentd6a82007bdc441046225269c39b06e1816c01458 (diff)
downloadcoreboot-d538dd1fe70a333c929a2eb7c4106608bcd05257.tar.xz
lib/lzmadecode: Add block around `UpdateBit1()`
Fix the error below. ``` src/lib/lzmadecode.c: In function 'LzmaDecode': src/lib/lzmadecode.c:77:2: error: macro expands to multiple statements \ [-Werror=multistatement-macros] Range -= bound; \ ^~~~~ src/lib/lzmadecode.c:300:7: note: in expansion of macro 'UpdateBit1' UpdateBit1(prob); ^~~~~~~~~~ src/lib/lzmadecode.c:299:8: note: some parts of macro expansion are not \ guarded by this 'else' clause } else ^~~~ cc1: all warnings being treated as errors ``` The macro is defined as below. #define UpdateBit1(p) \ Range -= bound; \ Code -= bound; \ *(p) -= (*(p)) >> kNumMoveBits Found-by: gcc-8 (Debian 8-20180402-1) 8.0.1 20180402 (experimental) [trunk revision 259004] Fixes: 35af5c47 (src/lib: Fix spacing) Change-Id: Ife0688541e23c05e26e429a6d8caee7e2d425b1b Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/25549 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/lib/lzmadecode.c')
-rw-r--r--src/lib/lzmadecode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/lzmadecode.c b/src/lib/lzmadecode.c
index c25001f26a..6d21f6c3b9 100644
--- a/src/lib/lzmadecode.c
+++ b/src/lib/lzmadecode.c
@@ -296,8 +296,9 @@ int LzmaDecode(CLzmaDecoderState *vs,
previousByte;
continue;
- } else
+ } else {
UpdateBit1(prob);
+ }
} else {
UInt32 distance;
UpdateBit1(prob);