/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:590:3: error: passing argument 3 of ‘gBS->CreateEvent’ from incompatible pointer type [-Werror=incompatible-pointer-types]
590 | &TimeoutSelf,
| ^~~~~~~~~~~~
| |
| void (*)(void *, void *)
/home/x/UEFI/edk22/MdeModulePkg/Application/UiApp/FrontPage.c:590:3: note: expected ‘EFI_EVENT_NOTIFY’ {aka ‘void (__attribute__((ms_abi)) *)(void *, void *)’} but argument is of type ‘void (*)(void *, void *)’
gBS->CreateEvent创建事件,在定义回调函数的时候需要添加EFIAPI,在-a IA32可以编译通过,但是在-a X64编译不通过。添加完EFIAPI后可编译通过。
VOID EFIAPI TimeoutSelf(
IN EFI_EVENT Event,
IN VOID *Context
)