From e630c3bec1c08475f79aaa1ea4b0cbac8f9ae29a Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 30 Oct 2020 06:03:21 +0100 Subject: [PATCH] api: fix zero-parameter C function prototypes Reported-by: Jason A. Donenfeld Signed-off-by: Simon Rozman --- api/adapter.c | 8 ++++---- api/adapter.h | 6 +++--- api/namespace.c | 6 +++--- api/namespace.h | 4 ++-- api/nci.c | 4 ++-- api/nci.h | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/api/adapter.c b/api/adapter.c index 63e1e76..e229249 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -287,7 +287,7 @@ AdapterEnableAll(_In_ HDEVINFO DevInfo, _In_ SP_DEVINFO_DATA_LIST *AdaptersToEna } WINTUN_STATUS -AdapterDeleteAllOurs() +AdapterDeleteAllOurs(void) { DWORD Result = ERROR_SUCCESS; HDEVINFO DevInfo = SetupDiGetClassDevsExW(&GUID_DEVCLASS_NET, NULL, NULL, DIGCF_PRESENT, NULL, NULL, NULL); @@ -328,7 +328,7 @@ AdapterDeleteAllOurs() } void -AdapterInit() +AdapterInit(void) { Locale = _wcreate_locale(LC_ALL, L""); @@ -350,7 +350,7 @@ AdapterInit() } void -AdapterCleanup() +AdapterCleanup(void) { _free_locale(Locale); } @@ -791,7 +791,7 @@ extern VOID NTAPI RtlGetNtVersionNumbers(_Out_opt_ DWORD *MajorVersion, _Out_opt_ DWORD *MinorVersion, _Out_opt_ DWORD *BuildNumber); static BOOL -HaveWHQL() +HaveWHQL(void) { # if defined(HAVE_EV) && defined(HAVE_WHQL) DWORD MajorVersion; diff --git a/api/adapter.h b/api/adapter.h index 5b9b651..04a9983 100644 --- a/api/adapter.h +++ b/api/adapter.h @@ -70,13 +70,13 @@ AdapterEnableAll(_In_ HDEVINFO DevInfo, _In_ SP_DEVINFO_DATA_LIST *AdaptersToEna * @return ERROR_SUCCESS on success; Win32 error code otherwise. */ WINTUN_STATUS -AdapterDeleteAllOurs(); +AdapterDeleteAllOurs(void); void -AdapterInit(); +AdapterInit(void); void -AdapterCleanup(); +AdapterCleanup(void); /** * Wintun adapter descriptor. diff --git a/api/namespace.c b/api/namespace.c index 8c4d4bc..2daf2f3 100644 --- a/api/namespace.c +++ b/api/namespace.c @@ -41,7 +41,7 @@ Bin2Hex(_In_bytecount_(Size) const void *Source, size_t Size, _Out_capcount_(Siz } static WINTUN_STATUS -NamespaceRuntimeInit() +NamespaceRuntimeInit(void) { DWORD Result; @@ -165,13 +165,13 @@ NamespaceReleaseMutex(_In_ HANDLE Mutex) } void -NamespaceInit() +NamespaceInit(void) { InitializeCriticalSection(&Initializing); } void -NamespaceCleanup() +NamespaceCleanup(void) { EnterCriticalSection(&Initializing); if (HasInitialized) diff --git a/api/namespace.h b/api/namespace.h index 8a26c4b..753068d 100644 --- a/api/namespace.h +++ b/api/namespace.h @@ -15,7 +15,7 @@ void NamespaceReleaseMutex(_In_ HANDLE Mutex); void -NamespaceInit(); +NamespaceInit(void); void -NamespaceCleanup(); +NamespaceCleanup(void); diff --git a/api/nci.c b/api/nci.c index 40c9edc..f57423d 100644 --- a/api/nci.c +++ b/api/nci.c @@ -16,7 +16,7 @@ DWORD(WINAPI *NciGetConnectionName) _Out_opt_ DWORD *OutDestNameBytes); void -NciInit() +NciInit(void) { NciModule = LoadLibraryW(L"nci.dll"); if (!NciModule) @@ -28,7 +28,7 @@ NciInit() } void -NciCleanup() +NciCleanup(void) { if (NciModule) FreeLibrary(NciModule); diff --git a/api/nci.h b/api/nci.h index 5090c90..4288655 100644 --- a/api/nci.h +++ b/api/nci.h @@ -16,7 +16,7 @@ extern DWORD(WINAPI *NciGetConnectionName)( _Out_opt_ DWORD *OutDestNameBytes); void -NciInit(); +NciInit(void); void -NciCleanup(); +NciCleanup(void);