Fixed astyle failures on handle_error().

pull/11332/head
Andrew Chong 2019-08-26 17:16:14 +08:00
parent 9af7ea58d4
commit d69dc4940e
1 changed files with 5 additions and 8 deletions

View File

@ -156,8 +156,7 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
if (error_status == MBED_ERROR_MEMMANAGE_EXCEPTION || if (error_status == MBED_ERROR_MEMMANAGE_EXCEPTION ||
error_status == MBED_ERROR_BUSFAULT_EXCEPTION || error_status == MBED_ERROR_BUSFAULT_EXCEPTION ||
error_status == MBED_ERROR_USAGEFAULT_EXCEPTION || error_status == MBED_ERROR_USAGEFAULT_EXCEPTION ||
error_status == MBED_ERROR_HARDFAULT_EXCEPTION) error_status == MBED_ERROR_HARDFAULT_EXCEPTION) {
{
#if defined(__CORTEX_M) #if defined(__CORTEX_M)
mbed_fault_context_t *mfc = (mbed_fault_context_t *)error_value; mbed_fault_context_t *mfc = (mbed_fault_context_t *)error_value;
current_error_ctx.error_address = (uint32_t)mfc->PC_reg; current_error_ctx.error_address = (uint32_t)mfc->PC_reg;
@ -166,9 +165,7 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
#else #else
#warning Please implement non Cortex-M handler for those error cases. #warning Please implement non Cortex-M handler for those error cases.
#endif #endif
} } else {
else
{
current_error_ctx.error_address = (uint32_t)caller; current_error_ctx.error_address = (uint32_t)caller;
current_error_ctx.thread_current_sp = (uint32_t)&current_error_ctx; // Address local variable to get a stack pointer current_error_ctx.thread_current_sp = (uint32_t)&current_error_ctx; // Address local variable to get a stack pointer
} }