]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Allow compiler to perform type checks on EFI_EVENT
authorMichael Brown <mcb30@ipxe.org>
Tue, 15 Jul 2025 15:51:05 +0000 (16:51 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 15 Jul 2025 15:57:25 +0000 (16:57 +0100)
commit8701863a17fab4726f1c76d7c123033d6e834019
tree3a33fea5ec1e2e32e4c5380c39267f24c43fce35
parent1e3fb1b37e16cd7cd30f6b20b9eee929568f35a9
[efi] Allow compiler to perform type checks on EFI_EVENT

As with EFI_HANDLE, the EFI headers define EFI_EVENT as a void
pointer, rendering EFI_EVENT compatible with a pointer to itself and
hence guaranteeing that pointer type bugs will be introduced.

Redefine EFI_EVENT as a pointer to an anonymous structure (as we
already do for EFI_HANDLE) to allow the compiler to perform type
checking as expected.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/efi/efi.h
src/interface/efi/efi_console.c
src/interface/efi/efi_snp.c