[coreboot] New patch to review for coreboot: 5e481ac libpayload: Don't declare the loop counter within the for loop

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Thu Mar 14 00:14:38 CET 2013

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2718


commit 5e481ac120d8768b870fe80cd1286c6c4f16b07b
Author: Gabe Black <gabeblack at google.com>
Date:   Sat Mar 2 03:32:19 2013 -0800

    libpayload: Don't declare the loop counter within the for loop
    'for' loop initial declarations are only allowed in C99 mode
    I didn't realize we don't enable 14 year old features when building
    libpayload, and I must have accidentally not rebuilt everything when making my
    final tweaks to my earlier change.
    Change-Id: I6caeeffad177b6d61fa30175f767e85084c061f4
    Signed-off-by: Gabe Black <gabeblack at google.com>
 payloads/libpayload/arch/armv7/exception.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/payloads/libpayload/arch/armv7/exception.c b/payloads/libpayload/arch/armv7/exception.c
index 8462b11..5e4e23d 100644
--- a/payloads/libpayload/arch/armv7/exception.c
+++ b/payloads/libpayload/arch/armv7/exception.c
@@ -45,11 +45,12 @@ void exception_fiq(uint32_t *);
 static void print_regs(uint32_t *regs)
+	int i;
 	/* Don't print the link register and stack pointer since we don't have their
 	 * actual value. They are hidden by the 'shadow' registers provided
 	 * by the trap hardware.
-	for (int i = 0; i < 16; i++) {
+	for (i = 0; i < 16; i++) {
 		if (i == 15)
 		else if (i == 14)

More information about the coreboot mailing list