]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Remove NORETURN for PeiCore() and DxeMain() function
authorLiming Gao <liming.gao@intel.com>
Wed, 22 Jun 2016 07:23:47 +0000 (15:23 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 23 Jun 2016 07:45:40 +0000 (15:45 +0800)
PeiCore EntryPoint library _ModuleEntryPoint() will call PeiCore(), then call
CpuDeadLoop (). When NORETURN is added for PeiCore(), MSVC compiler will report
warning C4702: unreachable code for CpuDeadLoop (). And, the warning is treated
as error and cause build break. DxeMain() has the similar issue.

edk2 uses EntryPoint library to wrap every module entry point function except
for SEC. The module entry point is still called by _ModuleEntryPoint(). So,
there will be negative impact to add NORETURN for the module entry point.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
MdeModulePkg/Core/Pei/PeiMain.h
MdeModulePkg/Core/Pei/PeiMain/PeiMain.c

index 8380fd78bed81bfd2b586f0536855290a9214e69..21cd61ad2e147db5da58b2fddd8f85a4ed5ac56d 100644 (file)
@@ -235,7 +235,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE    gLoa
 \r
 **/\r
 VOID\r
-NORETURN\r
 EFIAPI\r
 DxeMain (\r
   IN  VOID *HobStart\r
index 54331dabd84425bebe0684356d81e76255ed7427..24983201d0230fa4f89de7938fdd0e4612ee8904 100644 (file)
@@ -315,7 +315,6 @@ typedef struct {
 \r
 **/\r
 VOID\r
-NORETURN\r
 EFIAPI\r
 PeiCore (\r
   IN CONST EFI_SEC_PEI_HAND_OFF        *SecCoreData,\r
index 59fdd2614b146c58ec03ca282b3a0f6514034e45..956200f31245203d59216d3d2165a1376f38bbd4 100644 (file)
@@ -136,7 +136,6 @@ ShadowPeiCore (
 \r
 **/\r
 VOID\r
-NORETURN\r
 EFIAPI\r
 PeiCore (\r
   IN CONST EFI_SEC_PEI_HAND_OFF        *SecCoreDataPtr,\r