]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkUnixPkg/Dxe/PlatformBds/Generic/BootMaint/BootMaint.c
Fix the issues,
[mirror_edk2.git] / EdkUnixPkg / Dxe / PlatformBds / Generic / BootMaint / BootMaint.c
index 7dfad5156941b7994f35beefc874f80824c855a2..69da6768e93ed7e65b7991ec261d554ca55d589c 100644 (file)
@@ -449,6 +449,7 @@ Returns:
       Index2                  = (UINT16) (KeyValue - HANDLE_OPTION_OFFSET);\r
 \r
       NewMenuEntry            = BOpt_GetMenuEntry (&DriverMenu, Index2);\r
+      ASSERT (NewMenuEntry != NULL);\r
       Private->HandleContext  = (BM_HANDLE_CONTEXT *) NewMenuEntry->VariableContext;\r
 \r
       CleanUpPage (FORM_DRV_ADD_HANDLE_DESC_ID, Private);\r
@@ -556,6 +557,8 @@ Returns:
   case FORM_CON_COM_ID:\r
     NewMenuEntry                      = BOpt_GetMenuEntry (&TerminalMenu, Private->CurrentTerminal);\r
 \r
+    ASSERT (NewMenuEntry != NULL);\r
+\r
     NewTerminalContext                = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;\r
 \r
     NewTerminalContext->BaudRateIndex = CurrentFakeNVMap->COMBaudRate;\r
@@ -757,7 +760,7 @@ Returns:
   //\r
   // There should be only one EFI_HII_PROTOCOL Image\r
   //\r
-  Status = EfiLibLocateProtocol (&gEfiHiiProtocolGuid, &Hii);\r
+  Status = EfiLibLocateProtocol (&gEfiHiiProtocolGuid, (VOID**)&Hii);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
@@ -893,7 +896,7 @@ Returns:
   }\r
 \r
   Location  = (UINT8 *) &UpdateData->Data;\r
-  Status    = EfiLibLocateProtocol (&gEfiLegacyBiosProtocolGuid, &LegacyBios);\r
+  Status    = EfiLibLocateProtocol (&gEfiLegacyBiosProtocolGuid, (VOID**) &LegacyBios);\r
   if (!EFI_ERROR (Status)) {\r
     //\r
     // If LegacyBios Protocol is installed, add 3 tags about legacy boot option\r
@@ -1240,7 +1243,7 @@ Returns:
   //\r
   // There should only be one Form Configuration protocol\r
   //\r
-  Status = EfiLibLocateProtocol (&gEfiFormBrowserProtocolGuid, &FormConfig);\r
+  Status = EfiLibLocateProtocol (&gEfiFormBrowserProtocolGuid, (VOID**) &FormConfig);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r