Re: [edk2] [Patch] MdeModulePkg/Bds: Fix build failures of VS tool chain

2016-04-06 Thread Qiu, Shumin
Reviewed-by: Qiu Shumin 

-Original Message-
From: Ni, Ruiyu 
Sent: Thursday, April 07, 2016 10:14 AM
To: edk2-devel@lists.01.org
Cc: Ni, Ruiyu; Qiu, Shumin
Subject: [Patch] MdeModulePkg/Bds: Fix build failures of VS tool chain

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni 
Cc: Shumin Qiu 
---
 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


Re: [edk2] [Patch] MdeModulePkg/Bds: Fix build failures of VS tool chain

2016-04-06 Thread Wang, Sunny (HPS SW)
Thanks for fixing this.
Reviewed-by: Sunny Wang 

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ruiyu Ni
Sent: Thursday, April 07, 2016 10:14 AM
To: edk2-devel@lists.01.org
Cc: Ruiyu Ni ; Shumin Qiu 
Subject: [edk2] [Patch] MdeModulePkg/Bds: Fix build failures of VS tool chain

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni 
Cc: Shumin Qiu 
---
 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
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel