From: Jan Kiszka <[email protected]> On 32-bit systems, we get "cast to pointer from integer of different size" warnings. Silence then which we can safely do because the fdt_buffer will not exceed 32 bits, being provided by AllocatePages().
Signed-off-by: Jan Kiszka <[email protected]> --- kernel-stub/fdt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel-stub/fdt.c b/kernel-stub/fdt.c index 68315f9..e2174af 100644 --- a/kernel-stub/fdt.c +++ b/kernel-stub/fdt.c @@ -166,7 +166,8 @@ static EFI_STATUS clone_fdt(const VOID *fdt, UINTN size, error(L"Error allocating device tree buffer", status); return status; } - CopyMem((VOID *)*fdt_buffer, fdt, BE32_TO_HOST(header->TotalSize)); + CopyMem((VOID *)(uintptr_t)*fdt_buffer, fdt, + BE32_TO_HOST(header->TotalSize)); return EFI_SUCCESS; } @@ -203,7 +204,8 @@ EFI_STATUS replace_fdt(const VOID *fdt) return status; } - status = protocol->Fixup(protocol, (VOID *)fdt_buffer, &size, + status = protocol->Fixup(protocol, + (VOID *)(uintptr_t)fdt_buffer, &size, EFI_DT_APPLY_FIXUPS | EFI_DT_RESERVE_MEMORY); if (EFI_ERROR(status)) { @@ -214,7 +216,7 @@ EFI_STATUS replace_fdt(const VOID *fdt) } status = BS->InstallConfigurationTable(&EfiDtbTableGuid, - (VOID *)fdt_buffer); + (VOID *)(uintptr_t)fdt_buffer); if (EFI_ERROR(status)) { (VOID) BS->FreePages(fdt_buffer, SIZE_IN_PAGES(size)); error(L"Failed to install alternative device tree", status); -- 2.35.3 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/576141dc-b9d8-4b1f-b502-96197d076195%40siemens.com.
