Fix function type mismatch undefined behavior when calling through a pointer
All checks were successful
Builds / ExectOS (i686) (push) Successful in 35s
Builds / ExectOS (amd64) (push) Successful in 36s

This commit is contained in:
Rafal Kupiec 2024-06-09 22:26:01 +02:00
parent 3097ff6250
commit bd7d4f5a0d
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
3 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@
#define XTBL_TUI_MAX_DIALOG_WIDTH 100 #define XTBL_TUI_MAX_DIALOG_WIDTH 100
/* XTLDR Routine pointers */ /* XTLDR Routine pointers */
typedef LONG (*PBL_GET_MEMTYPE_ROUTINE)(IN LONG EfiMemoryType); typedef LONG (*PBL_GET_MEMTYPE_ROUTINE)(IN EFI_MEMORY_TYPE EfiMemoryType);
/* Boot Loader protocol routine pointers */ /* Boot Loader protocol routine pointers */
typedef EFI_STATUS (*PBL_ALLOCATE_PAGES)(IN ULONGLONG Size, OUT PEFI_PHYSICAL_ADDRESS Memory); typedef EFI_STATUS (*PBL_ALLOCATE_PAGES)(IN ULONGLONG Size, OUT PEFI_PHYSICAL_ADDRESS Memory);

View File

@ -465,7 +465,7 @@ BlpFindParentBlockDevice(IN PLIST_ENTRY BlockDevices,
OUT PEFI_BLOCK_DEVICE_DATA ParentNode); OUT PEFI_BLOCK_DEVICE_DATA ParentNode);
XTCDECL XTCDECL
LOADER_MEMORY_TYPE LONG
BlpGetLoaderMemoryType(IN EFI_MEMORY_TYPE EfiMemoryType); BlpGetLoaderMemoryType(IN EFI_MEMORY_TYPE EfiMemoryType);
XTCDECL XTCDECL

View File

@ -292,7 +292,7 @@ BlMapEfiMemory(IN OUT PXTBL_PAGE_MAPPING PageMap,
if(GetMemoryTypeRoutine == NULL) if(GetMemoryTypeRoutine == NULL)
{ {
/* Use default memory type routine */ /* Use default memory type routine */
GetMemoryTypeRoutine = (PBL_GET_MEMTYPE_ROUTINE)BlpGetLoaderMemoryType; GetMemoryTypeRoutine = BlpGetLoaderMemoryType;
} }
/* Allocate and zero-fill buffer for EFI memory map */ /* Allocate and zero-fill buffer for EFI memory map */
@ -703,7 +703,7 @@ BlPhysicalListToVirtual(IN PXTBL_PAGE_MAPPING PageMap,
* @since XT 1.0 * @since XT 1.0
*/ */
XTCDECL XTCDECL
LOADER_MEMORY_TYPE LONG
BlpGetLoaderMemoryType(IN EFI_MEMORY_TYPE EfiMemoryType) BlpGetLoaderMemoryType(IN EFI_MEMORY_TYPE EfiMemoryType)
{ {
LOADER_MEMORY_TYPE MemoryType; LOADER_MEMORY_TYPE MemoryType;