From 542417972de568fc8c83880042ea7553d901fdb9 Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Thu, 7 Apr 2016 10:13:39 +0800 Subject: [PATCH] MdeModulePkg/Bds: Fix build failures of VS tool chain Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Shumin Qiu Reviewed-by: Sunny Wang --- 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 2eb8971ba0..beb2eafe29 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 c6ac242094..29c1bfaaeb 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.39.2