From 7ab4135217dc431134a988122528ecbaf344c574 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 9 Nov 2011 23:24:12 +0100 Subject: dfu: The i variable to disable interrupts shadows the outer index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case ram_app_entry() returns do not reset i to 32, otherwise we will never reset the watchdog. src/dfu/dfu.c:1077:7: warning: declaration of ā€˜iā€™ shadows a previous local [-Wshadow] src/dfu/dfu.c:1068:6: warning: shadowed declaration is here [-Wshadow] --- firmware/src/dfu/dfu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/src/dfu/dfu.c b/firmware/src/dfu/dfu.c index 0e22256..48f2cdc 100644 --- a/firmware/src/dfu/dfu.c +++ b/firmware/src/dfu/dfu.c @@ -1074,9 +1074,9 @@ void __dfufunc dfu_main(void) } if (switch_to_ram) { void (*ram_app_entry)(void); - int i; - for (i = 0; i < 32; i++) - AT91F_AIC_DisableIt(AT91C_BASE_AIC, i); + int j; + for (j = 0; j < 32; j++) + AT91F_AIC_DisableIt(AT91C_BASE_AIC, j); /* jump into RAM */ AT91F_DBGU_Printk("JUMP TO RAM\r\n"); ram_app_entry = AT91C_ISRAM + SAM7DFU_RAM_SIZE; -- cgit v1.2.3