From cc86e63e835ab0bceb62215460a13266a791cdd3 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 2 Mar 2013 03:32:19 -0800 Subject: 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 Reviewed-on: http://review.coreboot.org/2718 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- payloads/libpayload/arch/armv7/exception.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'payloads/libpayload/arch') diff --git a/payloads/libpayload/arch/armv7/exception.c b/payloads/libpayload/arch/armv7/exception.c index 8462b11fd0..5e4e23d6a6 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) -- cgit v1.2.3