[coreboot-gerrit] Change in coreboot[master]: lib/lzmadecode.c: : Avoid static analysis error for unused value
Richard Spiegel (Code Review)
gerrit at coreboot.org
Sat Aug 11 00:46:00 CEST 2018
Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/28021
Change subject: lib/lzmadecode.c: : Avoid static analysis error for unused value
......................................................................
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
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 at silverbackltd.com>
---
M src/lib/lzmadecode.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/28021/1
diff --git a/src/lib/lzmadecode.c b/src/lib/lzmadecode.c
index 6d21f6c..0a5d038 100644
--- a/src/lib/lzmadecode.c
+++ b/src/lib/lzmadecode.c
@@ -422,6 +422,10 @@
}
}
RC_NORMALIZE;
+ /*
+ * Tell static analysis we know len can have a dead assignment.
+ */
+ (void)len;
*inSizeProcessed = (SizeT)(Buffer - inStream);
--
To view, visit https://review.coreboot.org/28021
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I37bc3ff19ca85f819ba1cbb2a281c1ad55619da9
Gerrit-Change-Number: 28021
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel at silverbackltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180810/4935db5e/attachment-0001.html>
More information about the coreboot-gerrit
mailing list