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>
This commit is contained in:
Paul Menzel 2018-03-30 10:25:56 +02:00 committed by Patrick Georgi
parent d6a82007bd
commit d538dd1fe7
1 changed files with 2 additions and 1 deletions

View File

@ -296,8 +296,9 @@ int LzmaDecode(CLzmaDecoderState *vs,
previousByte;
continue;
} else
} else {
UpdateBit1(prob);
}
} else {
UInt32 distance;
UpdateBit1(prob);