summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg
diff options
context:
space:
mode:
authorLeif Lindholm <leif@nuviainc.com>2020-07-21 13:50:56 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-07-23 12:05:44 +0000
commite43d0884ed93ffd8044e48e8d5d2d010a46aab33 (patch)
tree8dadca3547c850adc8358274fe4b249daff8809f /EmbeddedPkg
parent7ff0459739cd164592638fddfa2621a3b7c2ad2e (diff)
downloadedk2-e43d0884ed93ffd8044e48e8d5d2d010a46aab33.tar.gz
edk2-e43d0884ed93ffd8044e48e8d5d2d010a46aab33.tar.bz2
edk2-e43d0884ed93ffd8044e48e8d5d2d010a46aab33.zip
EmbeddedPkg: fix gcc build errors in AndroidBootImgLib
Commit dbd546a32d5a ("BaseTools: Add gcc flag to warn on void* pointer arithmetic") does its work and triggers build errors in this library. Update the affected code to build correctly again. Cc: Pierre Gondois <pierre.gondois@arm.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Bob Feng<bob.c.feng@intel.com> Reported-by: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r--EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
index e1036954ee..bbc240c363 100644
--- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
+++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
@@ -97,7 +97,7 @@ AndroidBootImgGetKernelInfo (
ASSERT (IS_VALID_ANDROID_PAGE_SIZE (Header->PageSize));
*KernelSize = Header->KernelSize;
- *Kernel = BootImg + Header->PageSize;
+ *Kernel = (VOID *)((UINTN)BootImg + Header->PageSize);
return EFI_SUCCESS;
}
@@ -341,7 +341,7 @@ AndroidBootImgUpdateFdt (
Status = AndroidBootImgSetProperty64 (UpdatedFdtBase, ChosenNode,
"linux,initrd-end",
- (UINTN)(RamdiskData + RamdiskSize));
+ (UINTN)RamdiskData + RamdiskSize);
if (EFI_ERROR (Status)) {
goto Fdt_Exit;
}