Fix bootloaders to make the StaticAnalysis build test happy.

This commit is contained in:
Dean Camera 2012-05-05 21:27:07 +00:00
parent 0e434c8f8f
commit 430973263b
2 changed files with 4 additions and 2 deletions

View File

@ -70,10 +70,11 @@ uint32_t MagicBootKey ATTR_NO_INIT;
*/ */
void Application_Jump_Check(void) void Application_Jump_Check(void)
{ {
// If the reset source was the bootloader and the key is correct, clear it and jump to the application /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY))
{ {
MagicBootKey = 0; MagicBootKey = 0;
// cppcheck-suppress constStatement
((void (*)(void))0x0000)(); ((void (*)(void))0x0000)();
} }
} }

View File

@ -55,10 +55,11 @@ uint32_t MagicBootKey ATTR_NO_INIT;
*/ */
void Application_Jump_Check(void) void Application_Jump_Check(void)
{ {
// If the reset source was the bootloader and the key is correct, clear it and jump to the application /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY))
{ {
MagicBootKey = 0; MagicBootKey = 0;
// cppcheck-suppress constStatement
((void (*)(void))0x0000)(); ((void (*)(void))0x0000)();
} }
} }