From 0ea3664bc30f81fbeb9d2ce9b7ca1e83e788aa23 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 18 Jun 2013 23:52:26 +0200 Subject: edid: fix warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/lib/edid.c:1177: error: ‘y’ may be used uninitialized in this function Warning is bogus, but seems my gcc (4.4.7 as shipped by RHEL-6) isn't clever enougth to figure this on its own. So help a bit by explicitly initializing the variable. Change-Id: Ia9f966c9c0a6bd92a9f41f1a4a3c8e49f258be37 Signed-off-by: Gerd Hoffmann Reviewed-on: http://review.coreboot.org/3501 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/lib/edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/edid.c b/src/lib/edid.c index 460d68dcb2..a794489aa0 100644 --- a/src/lib/edid.c +++ b/src/lib/edid.c @@ -1174,7 +1174,7 @@ int decode_edid(unsigned char *edid, int size, struct edid *out) printk(BIOS_SPEW, "Standard timings supported:\n"); for (i = 0; i < 8; i++) { uint8_t b1 = edid[0x26 + i * 2], b2 = edid[0x26 + i * 2 + 1]; - unsigned int x, y, refresh; + unsigned int x, y = 0, refresh; if (b1 == 0x01 && b2 == 0x01) continue; -- cgit v1.2.3