summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg
diff options
context:
space:
mode:
authorJayaprakash N <n.jayaprakash@intel.com>2024-02-06 08:19:31 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-02-09 18:12:47 +0000
commitdcf2e39dce00a5978f1c1a53a0fce04d0fdc9a3c (patch)
tree7e69469638f7eb623eaf94ad35bd3a194d1e5982 /EmbeddedPkg
parente32b58ab5a12d37c82327f28376e7d12cccc8b3a (diff)
downloadedk2-dcf2e39dce00a5978f1c1a53a0fce04d0fdc9a3c.tar.gz
edk2-dcf2e39dce00a5978f1c1a53a0fce04d0fdc9a3c.tar.bz2
edk2-dcf2e39dce00a5978f1c1a53a0fce04d0fdc9a3c.zip
EmbeddedPkg: compiler error due to arithmetic operation on void pointer
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4668 This commit fixes the issue reported in the BZ4668. The EmbeddedPkg fails to compile with a compiler error generated due to invalid/illegal arithmetic operation on void pointers. It has been fixed by using explicit type conversion of the void pointer to UINTN. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: Jayaprakash N <n.jayaprakash@intel.com> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r--EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c
index fa81cc9d59..f4077c04a7 100644
--- a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c
@@ -308,7 +308,7 @@ ReallocatePool (
if (OldBuffer != NULL) {
HandOffHob = GetHobList ();
ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)OldBuffer >= HandOffHob->EfiMemoryBottom));
- ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)(OldBuffer + OldSize) <= HandOffHob->EfiFreeMemoryBottom));
+ ASSERT (((EFI_PHYSICAL_ADDRESS)((UINTN)OldBuffer + OldSize) <= HandOffHob->EfiFreeMemoryBottom));
}
DEBUG_CODE_END ();