Commit 56c2bc96 authored by Wayne Ren's avatar Wayne Ren Committed by Andrew Boie
Browse files

kernel: add CODE_UNREACHABLE in _StackCheckHandler



* _StackCheckHandler is FUNC_NORETURN
* if _ARCH_EXCPET is redefined for specific arch and
  has function return in some cases, e.g., interrupt or
  exception, a compiler warning will come out
* So add CODE_UNREACHABLE to guarantee it will not return

Signed-off-by: default avatarWayne Ren <wei.ren@synopsys.com>
parent 1931f124
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ void FUNC_NORETURN _StackCheckHandler(void)
	/* Stack canary error is a software fatal condition; treat it as such.
	 */
	_k_except_reason(_NANO_ERR_STACK_CHK_FAIL);
	CODE_UNREACHABLE;
}

/* Global variable */