]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/Bcfg.c
Fix GCC build failure.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / Bcfg.c
index 095a9460e6ca4e76b30d4b172cd1be0a93eb0feb..73831d267e1cbf249ef9760e94351ee90c01d6b7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for bcfg shell Debug1 function.\r
 \r
-  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -293,7 +293,7 @@ BcfgAddDebug1(
   EFI_STATUS                Status;\r
   EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
   EFI_DEVICE_PATH_PROTOCOL  *FilePath;\r
-  EFI_DEVICE_PATH_PROTOCOL  *FileNode;\r
+  /* EFI_DEVICE_PATH_PROTOCOL  *FileNode; */\r
   CHAR16                    *Str;\r
   UINT8                     *TempByteBuffer;\r
   UINT8                     *TempByteStart;\r
@@ -328,7 +328,7 @@ BcfgAddDebug1(
 \r
   Str             = NULL;\r
   FilePath        = NULL;\r
-  FileNode        = NULL;\r
+  /* FileNode        = NULL; */\r
   FileList        = NULL;\r
   Handles         = NULL;\r
   ShellStatus     = SHELL_SUCCESS;\r
@@ -525,6 +525,7 @@ BcfgAddDebug1(
 \r
       CopyMem (TempByteBuffer, Desc, DescSize);\r
       TempByteBuffer += DescSize;\r
+      ASSERT (FilePath != NULL);\r
       CopyMem (TempByteBuffer, FilePath, FilePathSize);\r
 \r
       UnicodeSPrint (OptionStr, sizeof(OptionStr), L"%s%04x", Target == BcfgTargetBootOrder?L"Boot":L"Driver", TargetLocation);\r
@@ -1052,7 +1053,7 @@ BcfgDisplayDumpDebug1(
     if ((*(UINT16*)(Buffer+4)) != 0) {\r
       DevPath = AllocateZeroPool(*(UINT16*)(Buffer+4));\r
       CopyMem(DevPath, Buffer+6+StrSize((CHAR16*)(Buffer+6)), *(UINT16*)(Buffer+4));\r
-      DevPathString = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
+      DevPathString = ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
     } else {\r
       DevPath       = NULL;\r
       DevPathString = NULL;\r