diff options
author | Richard Spiegel <richard.spiegel@amd.corp-partner.google.com> | 2018-08-10 15:45:43 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-08-14 23:24:58 +0000 |
commit | fb09693ab69150159170465df49618e794f7dd59 (patch) | |
tree | e8c49e881cfffdc761575214d3312b1d4414b402 /src/lib/lzmadecode.c | |
parent | d820f4b8fb6602993c003f2db3e18029d9105b2a (diff) |
lib/lzmadecode.c: : Avoid static analysis error for unused value
Within procedure LzmaDecode(), the variable len can be assigned a value
that is never read after, thus causing a static analysis error. Tell the
coreboot scan-build static analysis we know it can happen.
BUG=b:112253891
TEST=Build and boot grunt.
Change-Id: I37bc3ff19ca85f819ba1cbb2a281c1ad55619da9
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/28021
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/lib/lzmadecode.c')
-rw-r--r-- | src/lib/lzmadecode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/lzmadecode.c b/src/lib/lzmadecode.c index 6d21f6c3b9..0a5d038638 100644 --- a/src/lib/lzmadecode.c +++ b/src/lib/lzmadecode.c @@ -422,6 +422,10 @@ int LzmaDecode(CLzmaDecoderState *vs, } } RC_NORMALIZE; + /* + * Tell static analysis we know len can have a dead assignment. + */ + (void)len; *inSizeProcessed = (SizeT)(Buffer - inStream); |