Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu...@intel.com>
Cc: Shumin Qiu <shumin....@intel.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 1 +
 MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c 
b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index 2eb8971..beb2eaf 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -699,6 +699,7 @@ BmExpandUriDevicePath (
     Handles = NULL;
   }
 
+  FileBuffer = NULL;
   for (Index = 0; Index < HandleCount; Index++) {
     FileBuffer = BmGetFileBufferFromLoadFile (Handles[Index], FilePath, 
FullPath, FileSize);
     if (FileBuffer != NULL) {
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c 
b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
index c6ac242..29c1bfa 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
@@ -232,7 +232,7 @@ BmSetMemoryTypeInformationVariable (
     // Do not count the reserved memory occupied by RAM Disk.
     //
     if (CurrentMemoryTypeInformation[Index1].Type == EfiReservedMemoryType) {
-      CurrentMemoryTypeInformation[Index1].NumberOfPages -= RamDiskSizeInPages;
+      CurrentMemoryTypeInformation[Index1].NumberOfPages -= (UINT32) 
RamDiskSizeInPages;
     }
 
     //
-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to