diff mbox

[edk2,5/5] OvmfPkg/PlatformPei: silence X64 VS2015x86 warning

Message ID 1468570456-15031-6-git-send-email-lersek@redhat.com
State Accepted
Commit fc3f005aee72aa5c3e1cf825381f8c3755b02101
Headers show

Commit Message

Laszlo Ersek July 15, 2016, 8:14 a.m. UTC
VS2015x86 reports the following warning for
"OvmfPkg/PlatformPei/MemDetect.c":

> MemDetect.c(357): error C2220: warning treated as error - no 'object'

>                   file generated

> MemDetect.c(357): warning C4244: '=': conversion from 'UINT64' to

>                   'UINT32', possible loss of data


LowerMemorySize is first assigned from GetSystemMemorySizeBelow4gb(),
which returns UINT32. Change the type of LowerMemorySize accordingly.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 OvmfPkg/PlatformPei/MemDetect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.8.3.1

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

Patch

diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c
index 9ee4b59623b9..8f66412763ad 100644
--- a/OvmfPkg/PlatformPei/MemDetect.c
+++ b/OvmfPkg/PlatformPei/MemDetect.c
@@ -335,7 +335,7 @@  PublishPeiMemory (
   EFI_STATUS                  Status;
   EFI_PHYSICAL_ADDRESS        MemoryBase;
   UINT64                      MemorySize;
-  UINT64                      LowerMemorySize;
+  UINT32                      LowerMemorySize;
   UINT32                      PeiMemoryCap;
 
   LowerMemorySize = GetSystemMemorySizeBelow4gb ();