[edk2-devel] [PATCH v1 03/15] StandaloneMmPkg: StandaloneMmCoreMemoryAllocationLib: Fix compiler warning
Kun Qin
kun.q at outlook.com
Fri Dec 18 18:49:59 UTC 2020
Assigning MmramRangeCount from MmCorePrivate (UINT64) to local variable
MmramRangeCount (UINT32) will cause compilation failure due to "warning
C4244: '=': conversion from 'UINT64' to 'UINT32', possible loss of data".
This changes defines local MmramRangeCount as UINT64 type.
Cc: Ard Biesheuvel <ard.biesheuvel at arm.com>
Cc: Sami Mujawar <sami.mujawar at arm.com>
Cc: Jiewen Yao <jiewen.yao at intel.com>
Cc: Supreeth Venkatesh <supreeth.venkatesh at arm.com>
Signed-off-by: Kun Qin <kun.q at outlook.com>
---
StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.c b/StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.c
index eb3d772e18c5..798d546a2037 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.c
@@ -841,7 +841,7 @@ MemoryAllocationLibConstructor (
VOID *HobStart;
EFI_MMRAM_HOB_DESCRIPTOR_BLOCK *MmramRangesHobData;
EFI_MMRAM_DESCRIPTOR *MmramRanges;
- UINT32 MmramRangeCount;
+ UINT64 MmramRangeCount;
EFI_HOB_GUID_TYPE *MmramRangesHob;
HobStart = GetHobList ();
--
2.28.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69220): https://edk2.groups.io/g/devel/message/69220
Mute This Topic: https://groups.io/mt/79068286/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list