From fb09693ab69150159170465df49618e794f7dd59 Mon Sep 17 00:00:00 2001 From: Richard Spiegel Date: Fri, 10 Aug 2018 15:45:43 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/28021 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/lib/lzmadecode.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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); -- cgit v1.2.3