[coreboot-gerrit] New patch to review for coreboot: 96b8d23 edid: fix warning

Gerd Hoffmann (kraxel@redhat.com) gerrit at coreboot.org
Wed Jun 19 00:27:50 CEST 2013


Gerd Hoffmann (kraxel at redhat.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3501

-gerrit

commit 96b8d23b3a111ed5b8784fe0c23e632d41faf545
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Tue Jun 18 23:52:26 2013 +0200

    edid: fix warning
    
    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 <kraxel at redhat.com>
---
 src/lib/edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edid.c b/src/lib/edid.c
index 460d68d..a794489 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;



More information about the coreboot-gerrit mailing list