]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/S3SaveState: cast Position for S3BootScriptLib explicitly
authorLaszlo Ersek <lersek@redhat.com>
Fri, 13 Sep 2019 17:33:38 +0000 (19:33 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 9 Oct 2019 07:40:10 +0000 (09:40 +0200)
The BootScriptInsert() and BootScriptLabel() functions take the in/out
parameter "Position" as (EFI_S3_BOOT_SCRIPT_POSITION*), and pass it to
S3BootScriptMoveLastOpcode() and S3BootScriptLabel(), respectively.

The callees take the in/out parameter "Position" as (VOID**). Add explicit
casts for clarity.

There is no change in functionality.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c
MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c

index e94d15772d786fbf7beec9d143fd672433759928..cfa8ebbd2f5d3316500c15ca4c2051097f844582 100644 (file)
@@ -810,7 +810,7 @@ BootScriptInsert (
   }\r
 \r
   if (!EFI_ERROR (Status)) {\r
-   Status = S3BootScriptMoveLastOpcode (BeforeOrAfter, Position);\r
+   Status = S3BootScriptMoveLastOpcode (BeforeOrAfter, (VOID **)Position);\r
   }\r
   return Status;\r
 }\r
@@ -851,7 +851,7 @@ BootScriptLabel (
   IN CONST CHAR8                                *Label\r
   )\r
 {\r
-  return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label);\r
+  return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, (VOID **)Position, Label);\r
 }\r
 /**\r
   Compare two positions in the boot script table and return their relative position.\r
index 9637df4fb82a730f1c8a5825dfa0e3b5da2302d3..fc6d29e48ba92fbb4077a2211a019fc43604f14a 100644 (file)
@@ -808,7 +808,7 @@ BootScriptInsert (
   }\r
 \r
   if (!EFI_ERROR (Status)) {\r
-   Status = S3BootScriptMoveLastOpcode (BeforeOrAfter, Position);\r
+   Status = S3BootScriptMoveLastOpcode (BeforeOrAfter, (VOID **)Position);\r
   }\r
   return Status;\r
 }\r
@@ -849,7 +849,7 @@ BootScriptLabel (
   IN CONST CHAR8                                *Label\r
   )\r
 {\r
-  return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label);\r
+  return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, (VOID **)Position, Label);\r
 }\r
 /**\r
   Compare two positions in the boot script table and return their relative position.\r