]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/TimerDxe/Timer.c
Fix ICC building issue for Nt32 platform.
[mirror_edk2.git] / Nt32Pkg / TimerDxe / Timer.c
index fd75c160c461379fbe57264e6042dcb40d65e200..8eb4865a83af2cc180478bd87cc97ae5f1381ede 100644 (file)
@@ -536,7 +536,9 @@ Returns:
   EFI_STATUS  Status;\r
   UINTN       Result;\r
   EFI_HANDLE  Handle;\r
-\r
+  EFI_HANDLE  hSourceProcessHandle;\r
+  EFI_HANDLE  hSourceHandle;\r
+  EFI_HANDLE  hTargetProcessHandle;\r
   //\r
   // Make sure the Timer Architectural Protocol is not already installed in the system\r
   //\r
@@ -545,16 +547,19 @@ Returns:
   //\r
   // Get the CPU Architectural Protocol instance\r
   //\r
-  Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, &mCpu);\r
+  Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID**)&mCpu);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
   //  Get our handle so the timer tick thread can suspend\r
   //\r
+  hSourceProcessHandle = gWinNt->GetCurrentProcess ();\r
+  hSourceHandle        = gWinNt->GetCurrentThread ();\r
+  hTargetProcessHandle = gWinNt->GetCurrentProcess ();\r
   Result = gWinNt->DuplicateHandle (\r
-                    gWinNt->GetCurrentProcess (),\r
-                    gWinNt->GetCurrentThread (),\r
-                    gWinNt->GetCurrentProcess (),\r
+                    hSourceProcessHandle,\r
+                    hSourceHandle,\r
+                    hTargetProcessHandle,\r
                     &mNtMainThreadHandle,\r
                     0,\r
                     FALSE,\r