efi: explicitly cast physical address to UINTN when converting to/from pointers
authorLennart Poettering <lennart@poettering.net>
Tue, 29 May 2018 15:12:39 +0000 (17:12 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 31 May 2018 14:10:46 +0000 (16:10 +0200)
commit33de6b57a82a70a5b1e6991d0eb459f5c49578f9
tree8b251c905c686d3f3ba178fbc8c74bd49168a64b
parentf3794366b07262ca213c63b61361e15647cfafda
efi: explicitly cast physical address to UINTN when converting to/from pointers

UINTN is the integer type equalling the native ptr size. Let's fix the
casting warnings described in #7788 by casting the the pointers and
values to this type first. That way we cast integers to the right size
first before turning them into pointers, and pointers are first
covnerted to integers of the right size before converting them into
integers.

Not tested, since I lack i386 EFI systems, but I think this is simple
enough to be correct event without testing.

Fixes: #7788
src/boot/efi/boot.c
src/boot/efi/linux.c
src/boot/efi/stub.c