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: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
Wayne Ren 2018-04-13 14:32:26 +08:00 committed by Andrew Boie
parent 1931f1242b
commit 56c2bc96a6
1 changed files with 1 additions and 0 deletions

View File

@ -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 */