Skip to content

Commit

Permalink
EmbeddedPkg: fix gcc build errors in AndroidBootImgLib
Browse files Browse the repository at this point in the history
Commit dbd546a
("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 <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Cc: Bob Feng<[email protected]>
Reported-by: Pierre Gondois <[email protected]>
Signed-off-by: Leif Lindholm <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
  • Loading branch information
leiflindholm authored and mergify[bot] committed Jul 23, 2020
1 parent 7ff0459 commit e43d088
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e43d088

Please sign in to comment.