diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2020-06-16 09:32:38 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-04-05 00:42:38 +0000 |
commit | e10c776487b431e59fb35999d954ea8057aa2b30 (patch) | |
tree | f277cf1e5d4d8b249d09970475427445bfcf7cb7 /PrmPkg/Application/PrmInfo/PrmInfo.c | |
parent | 4348c72ad0328fcf8ef37930cf51a5dbc2388038 (diff) | |
download | edk2-e10c776487b431e59fb35999d954ea8057aa2b30.tar.gz |
PrmPkg: Enforce stricter types
Makes the following changes to enforce stricter types:
1. PrmPkg/PrmConfigDxe
The function PrmConfigEndOfDxeNotification () is used as a notify
function (of type EFI_EVENT_NOTIFY), however it has a return type
of EFI_STATUS whereas the return type should actually be VOID.
2. PrmPkg/PrmLoaderDxe
Updates the following types to be more accurate than were allowed
in the VS compiler:
* 3rd actual argument given to GetModuleContextBuffers () is
explicitly marked as CONST PRM_MODULE_CONTEXT_BUFFERS **
* 3rd actual argument given to GetContextBuffer () is
explicitly marked as CONST PRM_CONTEXT_BUFFER **
* PrmLoaderEndOfDxeNotification () return type is changed to VOID
to align with the EFI_EVENT_NOTIFY type
3. PrmPkg/Application/PrmInfo
Updates the following types to be more accurate than were allowed
in the VS compiler:
* SHELL_STATUS in ParseParameterList () is now EFI_STATUS
* 3rd actual argument given to GetModuleContextBuffers () is
explicitly marked as CONST PRM_MODULE_CONTEXT_BUFFERS **
* 3rd actual argument given to GetContextBuffer () is
explicitly marked as CONST PRM_CONTEXT_BUFFER **
Cc: Andrew Fish <afish@apple.com>
Cc: Kang Gao <kang.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Liu Yun <yun.y.liu@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Ankit Sinha <ankit.sinha@intel.com>
Diffstat (limited to 'PrmPkg/Application/PrmInfo/PrmInfo.c')
-rw-r--r-- | PrmPkg/Application/PrmInfo/PrmInfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/PrmPkg/Application/PrmInfo/PrmInfo.c b/PrmPkg/Application/PrmInfo/PrmInfo.c index 431a6f2061..e479667ec7 100644 --- a/PrmPkg/Application/PrmInfo/PrmInfo.c +++ b/PrmPkg/Application/PrmInfo/PrmInfo.c @@ -221,7 +221,7 @@ GatherPrmHandlerInfo ( Status = GetModuleContextBuffers (
ByModuleGuid,
CurrentModuleGuid,
- &CurrentModuleContextBuffers
+ (CONST PRM_MODULE_CONTEXT_BUFFERS **) &CurrentModuleContextBuffers
);
ASSERT (!EFI_ERROR (Status) || Status == EFI_NOT_FOUND);
if (!EFI_ERROR (Status) && CurrentModuleContextBuffers != NULL) {
@@ -272,7 +272,7 @@ GatherPrmHandlerInfo ( Status = GetContextBuffer (
CurrentHandlerContext.Guid,
CurrentModuleContextBuffers,
- &CurrentContextBuffer
+ (CONST PRM_CONTEXT_BUFFER **) &CurrentContextBuffer
);
if (!EFI_ERROR (Status)) {
CurrentHandlerContext.StaticDataBuffer = CurrentContextBuffer->StaticDataBuffer;
@@ -520,7 +520,7 @@ ParseParameterList ( )
{
EFI_STATUS Status;
- SHELL_STATUS ReturnStatus;
+ EFI_STATUS ReturnStatus;
UINTN ArgumentCount;
EFI_GUID HandlerGuid;
BOOLEAN PrintHandlerInfo;
|