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>
This commit is contained in:
Richard Spiegel 2018-08-10 15:45:43 -07:00 committed by Martin Roth
parent d820f4b8fb
commit fb09693ab6
1 changed files with 4 additions and 0 deletions

View File

@ -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);