From 61257251b2f48ceac54fea42665e1f2e63dbb46e Mon Sep 17 00:00:00 2001 From: Marvin H?user Date: Sun, 19 Jun 2016 09:31:58 +0800 Subject: UefiCpuPkg/SecMain: Decorate phase-transition function with NORETURN. This patch adds the NORETURN attribute to the function that transfers to the PEI phase, along with an UNREACHABLE() call at the end to avoid false warnings. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marvin Haeuser Reviewed-by: Liming Gao --- UefiCpuPkg/SecCore/SecMain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'UefiCpuPkg/SecCore') diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c index ec252cf719..5e5d543e19 100644 --- a/UefiCpuPkg/SecCore/SecMain.c +++ b/UefiCpuPkg/SecCore/SecMain.c @@ -49,6 +49,7 @@ UINT64 mIdtEntryTemplate = 0xffff8e000010ffe4ULL; **/ VOID +NORETURN EFIAPI SecStartupPhase2( IN VOID *Context @@ -167,6 +168,7 @@ SecStartup ( **/ VOID +NORETURN EFIAPI SecStartupPhase2( IN VOID *Context @@ -252,7 +254,7 @@ SecStartupPhase2( // // Should not come here. // - return; + UNREACHABLE (); } /** -- cgit v1.2.3