diff options
author | Jayaprakash N <n.jayaprakash@intel.com> | 2024-02-06 08:19:31 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-02-09 18:12:47 +0000 |
commit | dcf2e39dce00a5978f1c1a53a0fce04d0fdc9a3c (patch) | |
tree | 7e69469638f7eb623eaf94ad35bd3a194d1e5982 | |
parent | e32b58ab5a12d37c82327f28376e7d12cccc8b3a (diff) | |
download | edk2-dcf2e39dce00a5978f1c1a53a0fce04d0fdc9a3c.tar.gz |
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>
-rw-r--r-- | EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c | 2 |
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 ();
|