From 2fdbe0caf7ea324c6b18bdbc5f75272f85bcd480 Mon Sep 17 00:00:00 2001 From: Richard Spiegel Date: Tue, 7 Aug 2018 08:43:22 -0700 Subject: lib/edid.c: Avoid static analysis error for unused value Within procedure cea_hdmi_block, the variable "b" is used as an index into a buffer of EDID bytes. At the end, it's incremented but not used, thus causing a static analysis error. Add a "(void)b;" at the end to avoid the static analysis error. BUG=b:112253891 TEST=Build and boot grunt. Change-Id: Ibd0b4a21bf82fcc46a627bc75564a850b7374989 Signed-off-by: Richard Spiegel Reviewed-on: https://review.coreboot.org/27929 Reviewed-by: Arthur Heymans Reviewed-by: Martin Roth Reviewed-by: Julius Werner Tested-by: build bot (Jenkins) --- src/lib/edid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/edid.c b/src/lib/edid.c index 7ad4136814..9cf9b8a1ed 100644 --- a/src/lib/edid.c +++ b/src/lib/edid.c @@ -817,8 +817,9 @@ cea_hdmi_block(struct edid *out, unsigned char *x) * (optionally: 3D_Detail_X and reserved) */ } - } + /* Tell static analysis we know index b is left unused. */ + (void)b; } } -- cgit v1.2.3