Hi, all
  Now, edk2 master build failure with VS tool chain. This patch resolves it. If 
no reject, I will like to push it today. 

Thanks
Liming
> -----Original Message-----
> From: edk2-devel [mailto:[email protected]] On Behalf Of
> Liming Gao
> Sent: Wednesday, June 22, 2016 3:47 PM
> To: [email protected]
> Subject: [edk2] [Patch] MdeModulePkg: Remove NORETURN for PeiCore()
> and DxeMain() function
> 
> 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 <[email protected]>
> Cc: Marvin Haeuser <[email protected]>
> ---
>  MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 1 -
>  MdeModulePkg/Core/Pei/PeiMain.h         | 1 -
>  MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 1 -
>  3 files changed, 3 deletions(-)
> 
> diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
> b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
> index 8380fd7..21cd61a 100644
> --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
> +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
> @@ -235,7 +235,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED
> EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE    gLoa
> 
>  **/
>  VOID
> -NORETURN
>  EFIAPI
>  DxeMain (
>    IN  VOID *HobStart
> diff --git a/MdeModulePkg/Core/Pei/PeiMain.h
> b/MdeModulePkg/Core/Pei/PeiMain.h
> index 54331da..2498320 100644
> --- a/MdeModulePkg/Core/Pei/PeiMain.h
> +++ b/MdeModulePkg/Core/Pei/PeiMain.h
> @@ -315,7 +315,6 @@ typedef struct {
> 
>  **/
>  VOID
> -NORETURN
>  EFIAPI
>  PeiCore (
>    IN CONST EFI_SEC_PEI_HAND_OFF        *SecCoreData,
> diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
> b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
> index 59fdd26..956200f 100644
> --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
> +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
> @@ -136,7 +136,6 @@ ShadowPeiCore (
> 
>  **/
>  VOID
> -NORETURN
>  EFIAPI
>  PeiCore (
>    IN CONST EFI_SEC_PEI_HAND_OFF        *SecCoreDataPtr,
> --
> 2.8.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to