[coreboot] Patch set updated for coreboot: 0cb105d 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:17:37 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

-gerrit

commit 0cb105daa485dcaef74c28734113e1d29c8d16a9
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)
 			printf("PC");
 		else if (i == 14)



More information about the coreboot mailing list