EmbeddedPkg: fix gcc build errors in AndroidBootImgLib

Commit dbd546a32d
("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>
This commit is contained in:
Leif Lindholm 2020-07-21 13:50:56 +01:00 committed by mergify[bot]
parent 7ff0459739
commit e43d0884ed
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}