Merge pull request #5727 from kaspar030/fix_panic_compile
cpu: cortexm_common: fix compile warning
This commit is contained in:
commit
11c11a5ecf
@ -205,8 +205,11 @@ __attribute__((used)) void hard_fault_handler(uint32_t* sp, uint32_t corrupted,
|
|||||||
uint32_t dfsr = SCB->DFSR;
|
uint32_t dfsr = SCB->DFSR;
|
||||||
uint32_t afsr = SCB->AFSR;
|
uint32_t afsr = SCB->AFSR;
|
||||||
#endif
|
#endif
|
||||||
uint32_t pc;
|
|
||||||
uint32_t* orig_sp;
|
/* Initialize these variables even if they're never used uninitialized.
|
||||||
|
* Fixes wrong compiler warning by gcc < 6.0. */
|
||||||
|
uint32_t pc = 0;
|
||||||
|
uint32_t* orig_sp = NULL;
|
||||||
|
|
||||||
/* Check if the ISR stack overflowed previously. Not possible to detect
|
/* Check if the ISR stack overflowed previously. Not possible to detect
|
||||||
* after output may also have overflowed it. */
|
* after output may also have overflowed it. */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user