diff options
author | Marvin H?user <Marvin.Haeuser@outlook.com> | 2016-06-19 09:31:16 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2016-06-22 09:37:18 +0800 |
commit | 3a7daf9eb028bdbfc16db12c4625cca10a083ba1 (patch) | |
tree | edf0c2e5375664b6e7145251693a6aa3e9ff1c2b /MdeModulePkg | |
parent | 90eda6fc279744c3ab200c149e4b75ed0c5dabf0 (diff) | |
download | edk2-3a7daf9eb028bdbfc16db12c4625cca10a083ba1.tar.gz edk2-3a7daf9eb028bdbfc16db12c4625cca10a083ba1.tar.bz2 edk2-3a7daf9eb028bdbfc16db12c4625cca10a083ba1.zip |
MdeModulePkg/Core: Decorate phase-transition functions with NORETURN.
This patch adds the NORETURN attribute to functions that transfer to
other phases, along with an UNREACHABLE() call at the end to avoid
false warnings.
DxeIpl has been excluded as its main function returns a status.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 3 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain.h | 1 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 5 |
3 files changed, 9 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index c34067e118..8380fd78be 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -235,6 +235,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE gLoa **/
VOID
+NORETURN
EFIAPI
DxeMain (
IN VOID *HobStart
@@ -524,6 +525,8 @@ DxeMain ( //
ASSERT (FALSE);
CpuDeadLoop ();
+
+ UNREACHABLE ();
}
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h index 24983201d0..54331dabd8 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.h +++ b/MdeModulePkg/Core/Pei/PeiMain.h @@ -315,6 +315,7 @@ 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 10db496140..59fdd2614b 100644 --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -136,6 +136,7 @@ ShadowPeiCore ( **/
VOID
+NORETURN
EFIAPI
PeiCore (
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreDataPtr,
@@ -275,6 +276,8 @@ PeiCore ( //
ASSERT (FALSE);
CpuDeadLoop();
+
+ UNREACHABLE ();
}
//
@@ -468,4 +471,6 @@ PeiCore ( //
ASSERT_EFI_ERROR (Status);
CpuDeadLoop();
+
+ UNREACHABLE ();
}
|