diff options
author | Matthijs Lavrijsen <mattiwatti@gmail.com> | 2022-08-17 07:55:38 +0200 |
---|---|---|
committer | Matthijs Lavrijsen <mattiwatti@gmail.com> | 2022-08-17 08:00:41 +0200 |
commit | f7f83efed4fc37077f9381e821e4454d35278495 (patch) | |
tree | 2a91eaf90232e42766178a39244fa08c2460be8f | |
parent | 6ef2473bc64dbde337fa4c475acd1c3a3fa788d1 (diff) |
Misc. warning fixes
-rw-r--r-- | Application/EfiDSEFix/src/pe.cpp | 2 | ||||
-rw-r--r-- | Application/Loader/Loader.c | 2 | ||||
-rw-r--r-- | EfiGuardDxe/EfiGuardDxe.c | 4 | ||||
-rw-r--r-- | EfiGuardDxe/PatchWinload.c | 4 | ||||
-rw-r--r-- | EfiGuardDxe/pe.c | 4 | ||||
-rw-r--r-- | EfiGuardDxe/pe.h | 2 | ||||
-rw-r--r-- | EfiGuardDxe/util.c | 4 | ||||
-rw-r--r-- | EfiGuardDxe/util.h | 2 | ||||
-rw-r--r-- | Include/Protocol/EfiGuard.h | 2 |
9 files changed, 13 insertions, 13 deletions
diff --git a/Application/EfiDSEFix/src/pe.cpp b/Application/EfiDSEFix/src/pe.cpp index 97d2333..78c5a8e 100644 --- a/Application/EfiDSEFix/src/pe.cpp +++ b/Application/EfiDSEFix/src/pe.cpp @@ -167,7 +167,7 @@ GetProcedureAddress( // Look up the import name in the name table using a binary search LONG Low = 0; LONG Middle = 0; - LONG High = ExportDirectory->NumberOfNames - 1; + LONG High = static_cast<LONG>(ExportDirectory->NumberOfNames) - 1; while (High >= Low) { diff --git a/Application/Loader/Loader.c b/Application/Loader/Loader.c index 1bdc860..fce88b8 100644 --- a/Application/Loader/Loader.c +++ b/Application/Loader/Loader.c @@ -564,7 +564,7 @@ TryBootOptionsInOrder( ImageInfo->ParentHandle = NULL; // Enable the Watchdog Timer for 5 minutes before calling the image - gBS->SetWatchdogTimer(5 * 60, 0x0000, 0x00, NULL); + gBS->SetWatchdogTimer((UINTN)(5 * 60), 0x0000, 0x00, NULL); // Start the image and set the return code in the boot option status Status = gBS->StartImage(ImageHandle, diff --git a/EfiGuardDxe/EfiGuardDxe.c b/EfiGuardDxe/EfiGuardDxe.c index 5bb300b..dc0b5fe 100644 --- a/EfiGuardDxe/EfiGuardDxe.c +++ b/EfiGuardDxe/EfiGuardDxe.c @@ -30,7 +30,7 @@ EfiGuardUnload( EFI_STATUS EFIAPI DriverConfigure( - IN EFIGUARD_CONFIGURATION_DATA* ConfigurationData + IN CONST EFIGUARD_CONFIGURATION_DATA* ConfigurationData ); EFIGUARD_DRIVER_PROTOCOL gEfiGuardDriverProtocol = @@ -453,7 +453,7 @@ SetVirtualAddressMapEvent( EFI_STATUS EFIAPI DriverConfigure( - IN EFIGUARD_CONFIGURATION_DATA* ConfigurationData + IN CONST EFIGUARD_CONFIGURATION_DATA* ConfigurationData ) { // Do not allow configure if we are at runtime, or if the Windows boot manager has been loaded diff --git a/EfiGuardDxe/PatchWinload.c b/EfiGuardDxe/PatchWinload.c index 277d9d2..eff1c91 100644 --- a/EfiGuardDxe/PatchWinload.c +++ b/EfiGuardDxe/PatchWinload.c @@ -53,8 +53,8 @@ STATIC PKLDR_DATA_TABLE_ENTRY EFIAPI GetBootLoadedModule( - IN LIST_ENTRY* LoadOrderListHead, - IN CHAR16* ModuleName + IN CONST LIST_ENTRY* LoadOrderListHead, + IN CONST CHAR16* ModuleName ) { if (ModuleName == NULL || LoadOrderListHead == NULL) diff --git a/EfiGuardDxe/pe.c b/EfiGuardDxe/pe.c index d7c0032..4655562 100644 --- a/EfiGuardDxe/pe.c +++ b/EfiGuardDxe/pe.c @@ -182,7 +182,7 @@ GetProcedureAddress( // Look up the import name in the name table using a binary search INT32 Low = 0; INT32 Middle = 0; - INT32 High = ExportDirectory->NumberOfNames - 1; + INT32 High = (INT32)ExportDirectory->NumberOfNames - 1; while (High >= Low) { @@ -211,7 +211,7 @@ GetProcedureAddress( EFI_STATUS EFIAPI FindIATAddressForImport( - IN VOID* ImageBase, + IN CONST VOID* ImageBase, IN PEFI_IMAGE_NT_HEADERS NtHeaders, IN CONST CHAR8* ImportDllName, IN CONST CHAR8* FunctionName, diff --git a/EfiGuardDxe/pe.h b/EfiGuardDxe/pe.h index 1104dfd..530d851 100644 --- a/EfiGuardDxe/pe.h +++ b/EfiGuardDxe/pe.h @@ -223,7 +223,7 @@ GetProcedureAddress( EFI_STATUS EFIAPI FindIATAddressForImport( - IN VOID* ImageBase, + IN CONST VOID* ImageBase, IN PEFI_IMAGE_NT_HEADERS NtHeaders, IN CONST CHAR8* ImportDllName, IN CONST CHAR8* FunctionName, diff --git a/EfiGuardDxe/util.c b/EfiGuardDxe/util.c index 011dab2..230f491 100644 --- a/EfiGuardDxe/util.c +++ b/EfiGuardDxe/util.c @@ -35,7 +35,7 @@ RtlSleep( VOID EFIAPI PrintLoadedImageInfo( - IN EFI_LOADED_IMAGE *ImageInfo + IN CONST EFI_LOADED_IMAGE *ImageInfo ) { CHAR16* PathString = ConvertDevicePathToText(ImageInfo->FilePath, TRUE, TRUE); @@ -361,7 +361,7 @@ BacktrackToFunctionStart( CONST UINT32 RelativeAddress = (UINT32)(AddressInFunction - ImageBase); PRUNTIME_FUNCTION FunctionEntry = NULL; INT32 Low = 0; - INT32 High = (FunctionTableSize / sizeof(RUNTIME_FUNCTION)) - 1; + INT32 High = (INT32)(FunctionTableSize / sizeof(RUNTIME_FUNCTION)) - 1; while (High >= Low) { diff --git a/EfiGuardDxe/util.h b/EfiGuardDxe/util.h index c306a0e..08e30e6 100644 --- a/EfiGuardDxe/util.h +++ b/EfiGuardDxe/util.h @@ -19,7 +19,7 @@ RtlSleep( VOID EFIAPI PrintLoadedImageInfo( - IN EFI_LOADED_IMAGE *ImageInfo + IN CONST EFI_LOADED_IMAGE *ImageInfo ); // diff --git a/Include/Protocol/EfiGuard.h b/Include/Protocol/EfiGuard.h index 1973813..d3f386e 100644 --- a/Include/Protocol/EfiGuard.h +++ b/Include/Protocol/EfiGuard.h @@ -114,7 +114,7 @@ typedef EFI_STATUS (EFIAPI* EFIGUARD_CONFIGURE)( - IN EFIGUARD_CONFIGURATION_DATA* ConfigurationData + IN CONST EFIGUARD_CONFIGURATION_DATA* ConfigurationData ); |