]> git.proxmox.com Git - mirror_edk2.git/commit
StandaloneMmPkg: StandaloneMmCoreMemoryAllocationLib: Fix compiler warning
authorKun Qin <kun.q@outlook.com>
Fri, 18 Dec 2020 02:51:05 +0000 (18:51 -0800)
committerKun Qin <kun.q@outlook.com>
Mon, 1 Feb 2021 18:01:02 +0000 (10:01 -0800)
commit2b9006762d2fb3637bd3a7d472f66c51aa8246f0
treeb2377e571c0be6593cc5da25d6f4b19935685790
parentf6c488b70416291634c4054f9f06a9a9db773365
StandaloneMmPkg: StandaloneMmCoreMemoryAllocationLib: Fix compiler warning

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 UINTN type and adds type
cast before value assignment.

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Signed-off-by: Kun Qin <kun.q@outlook.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.c