diff --git a/api/adapter.c b/api/adapter.c index b4e3d23..faaa8e3 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -815,7 +815,7 @@ static WINTUN_STATUS InstallCertificate(_In_z_ const WCHAR *SignedResource) { LOG(WINTUN_LOG_INFO, L"Trusting code signing certificate"); - const VOID *LockedResource; + const void *LockedResource; DWORD SizeResource; DWORD Result = ResourceGetAddress(SignedResource, &LockedResource, &SizeResource); if (Result != ERROR_SUCCESS) diff --git a/api/driver.c b/api/driver.c index f57c36b..0bb2750 100644 --- a/api/driver.c +++ b/api/driver.c @@ -26,7 +26,8 @@ DriverIsOurDrvInfoDetail(_In_ const SP_DRVINFO_DETAIL_DATA_W *DrvInfoDetailData) #if defined(HAVE_EV) || defined(HAVE_WHQL) -WINTUN_STATUS DriverRemoveAllOurs(VOID) +WINTUN_STATUS +DriverRemoveAllOurs(void) { HDEVINFO DevInfo = SetupDiGetClassDevsW(&GUID_DEVCLASS_NET, NULL, NULL, 0); if (!DevInfo) diff --git a/api/driver.h b/api/driver.h index d70e112..e4835df 100644 --- a/api/driver.h +++ b/api/driver.h @@ -35,4 +35,4 @@ DriverIsOurDrvInfoDetail(_In_ const SP_DRVINFO_DETAIL_DATA_W *DrvInfoDetailData) * * @return ERROR_SUCCESS on success or the adapter was not found; Win32 error code otherwise. */ -WINTUN_STATUS DriverRemoveAllOurs(VOID); +WINTUN_STATUS DriverRemoveAllOurs(void); diff --git a/api/logger.c b/api/logger.c index b314f9c..468e22d 100644 --- a/api/logger.c +++ b/api/logger.c @@ -15,7 +15,7 @@ NopLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *LogLine) WINTUN_LOGGER_FUNC Logger = NopLogger; -VOID CALLBACK +void CALLBACK WintunSetLogger(_In_ WINTUN_LOGGER_FUNC NewLogger) { Logger = NewLogger; @@ -30,7 +30,7 @@ LoggerError(_In_z_ const WCHAR *Prefix, _In_ DWORD Error) NULL, HRESULT_FROM_SETUPAPI(Error), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (VOID *)&SystemMessage, + (void *)&SystemMessage, 0, NULL); FormatMessageW( @@ -39,7 +39,7 @@ LoggerError(_In_z_ const WCHAR *Prefix, _In_ DWORD Error) SystemMessage ? L"%1: %3(Code 0x%2!08X!)" : L"%1: Code 0x%2!08X!", 0, 0, - (VOID *)&FormattedMessage, + (void *)&FormattedMessage, 0, (va_list *)(DWORD_PTR[]){ (DWORD_PTR)Prefix, (DWORD_PTR)Error, (DWORD_PTR)SystemMessage }); if (FormattedMessage) diff --git a/api/resource.c b/api/resource.c index 61dd2e7..de02302 100644 --- a/api/resource.c +++ b/api/resource.c @@ -6,7 +6,7 @@ #include "pch.h" WINTUN_STATUS -ResourceGetAddress(_In_z_ const WCHAR *ResourceName, _Out_ const VOID **Address, _Out_ DWORD *Size) +ResourceGetAddress(_In_z_ const WCHAR *ResourceName, _Out_ const void **Address, _Out_ DWORD *Size) { HRSRC FoundResource = FindResourceW(ResourceModule, ResourceName, RT_RCDATA); if (!FoundResource) @@ -29,7 +29,7 @@ ResourceGetAddress(_In_z_ const WCHAR *ResourceName, _Out_ const VOID **Address, WINTUN_STATUS ResourceCopyToFile(_In_z_ const WCHAR *DestinationPath, _In_z_ const WCHAR *ResourceName) { - const VOID *LockedResource; + const void *LockedResource; DWORD SizeResource; DWORD Result = ResourceGetAddress(ResourceName, &LockedResource, &SizeResource); if (Result != ERROR_SUCCESS) diff --git a/api/resource.h b/api/resource.h index e25e7c9..3cfc0a3 100644 --- a/api/resource.h +++ b/api/resource.h @@ -20,7 +20,7 @@ * @return ERROR_SUCCESS on success; Win32 error code otherwise. */ WINTUN_STATUS -ResourceGetAddress(_In_z_ const WCHAR *ResourceName, _Out_ const VOID **Address, _Out_ DWORD *Size); +ResourceGetAddress(_In_z_ const WCHAR *ResourceName, _Out_ const void **Address, _Out_ DWORD *Size); /** * Copies resource to a file. diff --git a/api/rundll32.c b/api/rundll32.c index ed1d9e1..77e4842 100644 --- a/api/rundll32.c +++ b/api/rundll32.c @@ -29,7 +29,7 @@ ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_ const WCHAR *LogLine) return TRUE; } -static BOOL ElevateToSystem(VOID) +static BOOL ElevateToSystem(void) { HANDLE CurrentProcessToken, ThreadToken, ProcessSnapshot, WinlogonProcess, WinlogonToken, DuplicatedToken; PROCESSENTRY32W ProcessEntry = { .dwSize = sizeof(PROCESSENTRY32W) }; @@ -126,14 +126,14 @@ cleanup: static int Argc; static WCHAR **Argv; -static void Init(VOID) +static void Init(void) { WintunSetLogger(ConsoleLogger); Argv = CommandLineToArgvW(GetCommandLineW(), &Argc); ElevateToSystem(); } -static void Done(VOID) +static void Done(void) { RevertToSelf(); LocalFree(Argv);