[winpr,warnings] fix -Wunused-parameter

This commit is contained in:
akallabeth 2025-02-13 15:28:27 +01:00
parent 0fdfc7a340
commit 76c2944d99
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
81 changed files with 1485 additions and 824 deletions

View File

@ -254,7 +254,7 @@ extern "C"
pcbe->Version = 1; pcbe->Version = 1;
} }
static INLINE VOID DestroyThreadpoolEnvironment(PTP_CALLBACK_ENVIRON pcbe) static INLINE VOID DestroyThreadpoolEnvironment(WINPR_ATTR_UNUSED PTP_CALLBACK_ENVIRON pcbe)
{ {
/* no actions, this may change in a future release. */ /* no actions, this may change in a future release. */
} }

View File

@ -18,6 +18,7 @@
*/ */
#include <winpr/config.h> #include <winpr/config.h>
#include <winpr/wlog.h>
#ifndef _WIN32 #ifndef _WIN32
#include <winpr/bcrypt.h> #include <winpr/bcrypt.h>
@ -27,87 +28,126 @@
* http://msdn.microsoft.com/en-us/library/windows/desktop/aa376210/ * http://msdn.microsoft.com/en-us/library/windows/desktop/aa376210/
*/ */
NTSTATUS BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE* phAlgorithm, LPCWSTR pszAlgId, NTSTATUS BCryptOpenAlgorithmProvider(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE* phAlgorithm,
LPCWSTR pszImplementation, ULONG dwFlags) WINPR_ATTR_UNUSED LPCWSTR pszAlgId,
WINPR_ATTR_UNUSED LPCWSTR pszImplementation,
WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE hAlgorithm, ULONG dwFlags) NTSTATUS BCryptCloseAlgorithmProvider(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm,
WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptGetProperty(BCRYPT_HANDLE hObject, LPCWSTR pszProperty, PUCHAR pbOutput, NTSTATUS BCryptGetProperty(WINPR_ATTR_UNUSED BCRYPT_HANDLE hObject,
ULONG cbOutput, ULONG* pcbResult, ULONG dwFlags) WINPR_ATTR_UNUSED LPCWSTR pszProperty, WINPR_ATTR_UNUSED PUCHAR pbOutput,
WINPR_ATTR_UNUSED ULONG cbOutput, WINPR_ATTR_UNUSED ULONG* pcbResult,
WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptCreateHash(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_HASH_HANDLE* phHash, NTSTATUS BCryptCreateHash(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm,
PUCHAR pbHashObject, ULONG cbHashObject, PUCHAR pbSecret, ULONG cbSecret, WINPR_ATTR_UNUSED BCRYPT_HASH_HANDLE* phHash,
ULONG dwFlags) WINPR_ATTR_UNUSED PUCHAR pbHashObject,
WINPR_ATTR_UNUSED ULONG cbHashObject, WINPR_ATTR_UNUSED PUCHAR pbSecret,
WINPR_ATTR_UNUSED ULONG cbSecret, WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptDestroyHash(BCRYPT_HASH_HANDLE hHash) NTSTATUS BCryptDestroyHash(WINPR_ATTR_UNUSED BCRYPT_HASH_HANDLE hHash)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptHashData(BCRYPT_HASH_HANDLE hHash, PUCHAR pbInput, ULONG cbInput, ULONG dwFlags) NTSTATUS BCryptHashData(WINPR_ATTR_UNUSED BCRYPT_HASH_HANDLE hHash,
WINPR_ATTR_UNUSED PUCHAR pbInput, WINPR_ATTR_UNUSED ULONG cbInput,
WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptFinishHash(BCRYPT_HASH_HANDLE hHash, PUCHAR pbOutput, ULONG cbOutput, ULONG dwFlags) NTSTATUS BCryptFinishHash(WINPR_ATTR_UNUSED BCRYPT_HASH_HANDLE hHash,
WINPR_ATTR_UNUSED PUCHAR pbOutput, WINPR_ATTR_UNUSED ULONG cbOutput,
WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptGenRandom(BCRYPT_ALG_HANDLE hAlgorithm, PUCHAR pbBuffer, ULONG cbBuffer, NTSTATUS BCryptGenRandom(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm,
ULONG dwFlags) WINPR_ATTR_UNUSED PUCHAR pbBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer,
WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptGenerateSymmetricKey(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE* phKey, NTSTATUS BCryptGenerateSymmetricKey(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm,
PUCHAR pbKeyObject, ULONG cbKeyObject, PUCHAR pbSecret, WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE* phKey,
ULONG cbSecret, ULONG dwFlags) WINPR_ATTR_UNUSED PUCHAR pbKeyObject,
WINPR_ATTR_UNUSED ULONG cbKeyObject,
WINPR_ATTR_UNUSED PUCHAR pbSecret,
WINPR_ATTR_UNUSED ULONG cbSecret,
WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptGenerateKeyPair(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE* phKey, NTSTATUS BCryptGenerateKeyPair(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm,
ULONG dwLength, ULONG dwFlags) WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE* phKey,
WINPR_ATTR_UNUSED ULONG dwLength, WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptImportKey(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE hImportKey, NTSTATUS BCryptImportKey(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm,
LPCWSTR pszBlobType, BCRYPT_KEY_HANDLE* phKey, PUCHAR pbKeyObject, WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE hImportKey,
ULONG cbKeyObject, PUCHAR pbInput, ULONG cbInput, ULONG dwFlags) WINPR_ATTR_UNUSED LPCWSTR pszBlobType,
WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE* phKey,
WINPR_ATTR_UNUSED PUCHAR pbKeyObject, WINPR_ATTR_UNUSED ULONG cbKeyObject,
WINPR_ATTR_UNUSED PUCHAR pbInput, WINPR_ATTR_UNUSED ULONG cbInput,
WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptDestroyKey(BCRYPT_KEY_HANDLE hKey) NTSTATUS BCryptDestroyKey(WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE hKey)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptEncrypt(BCRYPT_KEY_HANDLE hKey, PUCHAR pbInput, ULONG cbInput, VOID* pPaddingInfo, NTSTATUS BCryptEncrypt(WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE hKey, WINPR_ATTR_UNUSED PUCHAR pbInput,
PUCHAR pbIV, ULONG cbIV, PUCHAR pbOutput, ULONG cbOutput, ULONG* pcbResult, WINPR_ATTR_UNUSED ULONG cbInput, WINPR_ATTR_UNUSED VOID* pPaddingInfo,
ULONG dwFlags) WINPR_ATTR_UNUSED PUCHAR pbIV, WINPR_ATTR_UNUSED ULONG cbIV,
WINPR_ATTR_UNUSED PUCHAR pbOutput, WINPR_ATTR_UNUSED ULONG cbOutput,
WINPR_ATTR_UNUSED ULONG* pcbResult, WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }
NTSTATUS BCryptDecrypt(BCRYPT_KEY_HANDLE hKey, PUCHAR pbInput, ULONG cbInput, VOID* pPaddingInfo, NTSTATUS BCryptDecrypt(WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE hKey, WINPR_ATTR_UNUSED PUCHAR pbInput,
PUCHAR pbIV, ULONG cbIV, PUCHAR pbOutput, ULONG cbOutput, ULONG* pcbResult, WINPR_ATTR_UNUSED ULONG cbInput, WINPR_ATTR_UNUSED VOID* pPaddingInfo,
ULONG dwFlags) WINPR_ATTR_UNUSED PUCHAR pbIV, WINPR_ATTR_UNUSED ULONG cbIV,
WINPR_ATTR_UNUSED PUCHAR pbOutput, WINPR_ATTR_UNUSED ULONG cbOutput,
WINPR_ATTR_UNUSED ULONG* pcbResult, WINPR_ATTR_UNUSED ULONG dwFlags)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }

View File

@ -108,8 +108,10 @@ static void* clipboard_synthesize_cf_oemtext(wClipboard* clipboard, UINT32 forma
* System locale identifier associated with CF_TEXT * System locale identifier associated with CF_TEXT
*/ */
static void* clipboard_synthesize_cf_locale(wClipboard* clipboard, UINT32 formatId, static void* clipboard_synthesize_cf_locale(WINPR_ATTR_UNUSED wClipboard* clipboard,
const void* data, UINT32* pSize) WINPR_ATTR_UNUSED UINT32 formatId,
WINPR_ATTR_UNUSED const void* data,
WINPR_ATTR_UNUSED UINT32* pSize)
{ {
UINT32* pDstData = NULL; UINT32* pDstData = NULL;
pDstData = (UINT32*)malloc(sizeof(UINT32)); pDstData = (UINT32*)malloc(sizeof(UINT32));
@ -263,8 +265,9 @@ static void* clipboard_synthesize_cf_dib(wClipboard* clipboard, UINT32 formatId,
* BITMAPV5HEADER structure followed by the bitmap color space information and the bitmap bits. * BITMAPV5HEADER structure followed by the bitmap color space information and the bitmap bits.
*/ */
static void* clipboard_synthesize_cf_dibv5(wClipboard* clipboard, UINT32 formatId, const void* data, static void* clipboard_synthesize_cf_dibv5(wClipboard* clipboard, UINT32 formatId,
UINT32* pSize) WINPR_ATTR_UNUSED const void* data,
WINPR_ATTR_UNUSED UINT32* pSize)
{ {
if (formatId == CF_DIB) if (formatId == CF_DIB)
{ {
@ -325,8 +328,8 @@ fail:
* Bitmap file format. * Bitmap file format.
*/ */
static void* clipboard_synthesize_image_bmp(wClipboard* clipboard, UINT32 formatId, static void* clipboard_synthesize_image_bmp(WINPR_ATTR_UNUSED wClipboard* clipboard,
const void* data, UINT32* pSize) UINT32 formatId, const void* data, UINT32* pSize)
{ {
UINT32 SrcSize = *pSize; UINT32 SrcSize = *pSize;
@ -402,7 +405,8 @@ static void* clipboard_synthesize_image_bmp_to_png(wClipboard* clipboard, UINT32
pSize); pSize);
} }
static void* clipboard_synthesize_image_format_to_bmp(wClipboard* clipboard, UINT32 srcFormatId, static void* clipboard_synthesize_image_format_to_bmp(wClipboard* clipboard,
WINPR_ATTR_UNUSED UINT32 srcFormatId,
const void* data, UINT32* pSize) const void* data, UINT32* pSize)
{ {
WINPR_ASSERT(clipboard); WINPR_ASSERT(clipboard);

View File

@ -536,7 +536,8 @@ error:
return NULL; return NULL;
} }
static void* convert_any_uri_list_to_filedescriptors(wClipboard* clipboard, UINT32 formatId, static void* convert_any_uri_list_to_filedescriptors(wClipboard* clipboard,
WINPR_ATTR_UNUSED UINT32 formatId,
UINT32* pSize) UINT32* pSize)
{ {
FILEDESCRIPTORW* descriptors = NULL; FILEDESCRIPTORW* descriptors = NULL;
@ -1216,27 +1217,31 @@ static UINT delegate_file_request_range(wClipboardDelegate* delegate,
return NO_ERROR; return NO_ERROR;
} }
static UINT dummy_file_size_success(wClipboardDelegate* delegate, static UINT dummy_file_size_success(WINPR_ATTR_UNUSED wClipboardDelegate* delegate,
const wClipboardFileSizeRequest* request, UINT64 fileSize) WINPR_ATTR_UNUSED const wClipboardFileSizeRequest* request,
WINPR_ATTR_UNUSED UINT64 fileSize)
{ {
return ERROR_NOT_SUPPORTED; return ERROR_NOT_SUPPORTED;
} }
static UINT dummy_file_size_failure(wClipboardDelegate* delegate, static UINT dummy_file_size_failure(WINPR_ATTR_UNUSED wClipboardDelegate* delegate,
const wClipboardFileSizeRequest* request, UINT errorCode) WINPR_ATTR_UNUSED const wClipboardFileSizeRequest* request,
WINPR_ATTR_UNUSED UINT errorCode)
{ {
return ERROR_NOT_SUPPORTED; return ERROR_NOT_SUPPORTED;
} }
static UINT dummy_file_range_success(wClipboardDelegate* delegate, static UINT dummy_file_range_success(WINPR_ATTR_UNUSED wClipboardDelegate* delegate,
const wClipboardFileRangeRequest* request, const BYTE* data, WINPR_ATTR_UNUSED const wClipboardFileRangeRequest* request,
UINT32 size) WINPR_ATTR_UNUSED const BYTE* data,
WINPR_ATTR_UNUSED UINT32 size)
{ {
return ERROR_NOT_SUPPORTED; return ERROR_NOT_SUPPORTED;
} }
static UINT dummy_file_range_failure(wClipboardDelegate* delegate, static UINT dummy_file_range_failure(WINPR_ATTR_UNUSED wClipboardDelegate* delegate,
const wClipboardFileRangeRequest* request, UINT errorCode) WINPR_ATTR_UNUSED const wClipboardFileRangeRequest* request,
WINPR_ATTR_UNUSED UINT errorCode)
{ {
return ERROR_NOT_SUPPORTED; return ERROR_NOT_SUPPORTED;
} }

View File

@ -206,7 +206,7 @@ void CommLog_Print(DWORD level, ...)
va_end(ap); va_end(ap);
} }
BOOL BuildCommDCBA(LPCSTR lpDef, LPDCB lpDCB) BOOL BuildCommDCBA(WINPR_ATTR_UNUSED LPCSTR lpDef, WINPR_ATTR_UNUSED LPDCB lpDCB)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -217,7 +217,7 @@ BOOL BuildCommDCBA(LPCSTR lpDef, LPDCB lpDCB)
return FALSE; return FALSE;
} }
BOOL BuildCommDCBW(LPCWSTR lpDef, LPDCB lpDCB) BOOL BuildCommDCBW(WINPR_ATTR_UNUSED LPCWSTR lpDef, WINPR_ATTR_UNUSED LPDCB lpDCB)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -228,7 +228,8 @@ BOOL BuildCommDCBW(LPCWSTR lpDef, LPDCB lpDCB)
return FALSE; return FALSE;
} }
BOOL BuildCommDCBAndTimeoutsA(LPCSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommTimeouts) BOOL BuildCommDCBAndTimeoutsA(WINPR_ATTR_UNUSED LPCSTR lpDef, WINPR_ATTR_UNUSED LPDCB lpDCB,
WINPR_ATTR_UNUSED LPCOMMTIMEOUTS lpCommTimeouts)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -239,7 +240,8 @@ BOOL BuildCommDCBAndTimeoutsA(LPCSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommTi
return FALSE; return FALSE;
} }
BOOL BuildCommDCBAndTimeoutsW(LPCWSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommTimeouts) BOOL BuildCommDCBAndTimeoutsW(WINPR_ATTR_UNUSED LPCWSTR lpDef, WINPR_ATTR_UNUSED LPDCB lpDCB,
WINPR_ATTR_UNUSED LPCOMMTIMEOUTS lpCommTimeouts)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -250,7 +252,8 @@ BOOL BuildCommDCBAndTimeoutsW(LPCWSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommT
return FALSE; return FALSE;
} }
BOOL CommConfigDialogA(LPCSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC) BOOL CommConfigDialogA(WINPR_ATTR_UNUSED LPCSTR lpszName, WINPR_ATTR_UNUSED HWND hWnd,
WINPR_ATTR_UNUSED LPCOMMCONFIG lpCC)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -261,7 +264,8 @@ BOOL CommConfigDialogA(LPCSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC)
return FALSE; return FALSE;
} }
BOOL CommConfigDialogW(LPCWSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC) BOOL CommConfigDialogW(WINPR_ATTR_UNUSED LPCWSTR lpszName, WINPR_ATTR_UNUSED HWND hWnd,
WINPR_ATTR_UNUSED LPCOMMCONFIG lpCC)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -272,7 +276,8 @@ BOOL CommConfigDialogW(LPCWSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC)
return FALSE; return FALSE;
} }
BOOL GetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) BOOL GetCommConfig(HANDLE hCommDev, WINPR_ATTR_UNUSED LPCOMMCONFIG lpCC,
WINPR_ATTR_UNUSED LPDWORD lpdwSize)
{ {
WINPR_COMM* pComm = (WINPR_COMM*)hCommDev; WINPR_COMM* pComm = (WINPR_COMM*)hCommDev;
@ -289,7 +294,8 @@ BOOL GetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize)
return FALSE; return FALSE;
} }
BOOL SetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, DWORD dwSize) BOOL SetCommConfig(HANDLE hCommDev, WINPR_ATTR_UNUSED LPCOMMCONFIG lpCC,
WINPR_ATTR_UNUSED DWORD dwSize)
{ {
WINPR_COMM* pComm = (WINPR_COMM*)hCommDev; WINPR_COMM* pComm = (WINPR_COMM*)hCommDev;
@ -306,7 +312,7 @@ BOOL SetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, DWORD dwSize)
return FALSE; return FALSE;
} }
BOOL GetCommMask(HANDLE hFile, PDWORD lpEvtMask) BOOL GetCommMask(HANDLE hFile, WINPR_ATTR_UNUSED PDWORD lpEvtMask)
{ {
WINPR_COMM* pComm = (WINPR_COMM*)hFile; WINPR_COMM* pComm = (WINPR_COMM*)hFile;
@ -323,7 +329,7 @@ BOOL GetCommMask(HANDLE hFile, PDWORD lpEvtMask)
return FALSE; return FALSE;
} }
BOOL SetCommMask(HANDLE hFile, DWORD dwEvtMask) BOOL SetCommMask(HANDLE hFile, WINPR_ATTR_UNUSED DWORD dwEvtMask)
{ {
WINPR_COMM* pComm = (WINPR_COMM*)hFile; WINPR_COMM* pComm = (WINPR_COMM*)hFile;
@ -340,7 +346,7 @@ BOOL SetCommMask(HANDLE hFile, DWORD dwEvtMask)
return FALSE; return FALSE;
} }
BOOL GetCommModemStatus(HANDLE hFile, PDWORD lpModemStat) BOOL GetCommModemStatus(HANDLE hFile, WINPR_ATTR_UNUSED PDWORD lpModemStat)
{ {
WINPR_COMM* pComm = (WINPR_COMM*)hFile; WINPR_COMM* pComm = (WINPR_COMM*)hFile;
@ -807,7 +813,8 @@ BOOL SetCommTimeouts(HANDLE hFile, LPCOMMTIMEOUTS lpCommTimeouts)
return TRUE; return TRUE;
} }
BOOL GetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) BOOL GetDefaultCommConfigA(WINPR_ATTR_UNUSED LPCSTR lpszName, WINPR_ATTR_UNUSED LPCOMMCONFIG lpCC,
WINPR_ATTR_UNUSED LPDWORD lpdwSize)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -818,7 +825,8 @@ BOOL GetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize)
return FALSE; return FALSE;
} }
BOOL GetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) BOOL GetDefaultCommConfigW(WINPR_ATTR_UNUSED LPCWSTR lpszName, WINPR_ATTR_UNUSED LPCOMMCONFIG lpCC,
WINPR_ATTR_UNUSED LPDWORD lpdwSize)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -829,7 +837,8 @@ BOOL GetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize
return FALSE; return FALSE;
} }
BOOL SetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize) BOOL SetDefaultCommConfigA(WINPR_ATTR_UNUSED LPCSTR lpszName, WINPR_ATTR_UNUSED LPCOMMCONFIG lpCC,
WINPR_ATTR_UNUSED DWORD dwSize)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -840,7 +849,8 @@ BOOL SetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize)
return FALSE; return FALSE;
} }
BOOL SetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize) BOOL SetDefaultCommConfigW(WINPR_ATTR_UNUSED LPCWSTR lpszName, WINPR_ATTR_UNUSED LPCOMMCONFIG lpCC,
WINPR_ATTR_UNUSED DWORD dwSize)
{ {
if (!CommInitialized()) if (!CommInitialized())
return FALSE; return FALSE;
@ -885,7 +895,8 @@ BOOL ClearCommBreak(HANDLE hFile)
return FALSE; return FALSE;
} }
BOOL ClearCommError(HANDLE hFile, PDWORD lpErrors, LPCOMSTAT lpStat) BOOL ClearCommError(HANDLE hFile, WINPR_ATTR_UNUSED PDWORD lpErrors,
WINPR_ATTR_UNUSED LPCOMSTAT lpStat)
{ {
WINPR_COMM* pComm = (WINPR_COMM*)hFile; WINPR_COMM* pComm = (WINPR_COMM*)hFile;
@ -942,7 +953,7 @@ BOOL SetupComm(HANDLE hFile, DWORD dwInQueue, DWORD dwOutQueue)
return TRUE; return TRUE;
} }
BOOL EscapeCommFunction(HANDLE hFile, DWORD dwFunc) BOOL EscapeCommFunction(HANDLE hFile, WINPR_ATTR_UNUSED DWORD dwFunc)
{ {
WINPR_COMM* pComm = (WINPR_COMM*)hFile; WINPR_COMM* pComm = (WINPR_COMM*)hFile;
@ -959,7 +970,7 @@ BOOL EscapeCommFunction(HANDLE hFile, DWORD dwFunc)
return FALSE; return FALSE;
} }
BOOL TransmitCommChar(HANDLE hFile, char cChar) BOOL TransmitCommChar(HANDLE hFile, WINPR_ATTR_UNUSED char cChar)
{ {
WINPR_COMM* pComm = (WINPR_COMM*)hFile; WINPR_COMM* pComm = (WINPR_COMM*)hFile;
@ -976,7 +987,8 @@ BOOL TransmitCommChar(HANDLE hFile, char cChar)
return FALSE; return FALSE;
} }
BOOL WaitCommEvent(HANDLE hFile, PDWORD lpEvtMask, LPOVERLAPPED lpOverlapped) BOOL WaitCommEvent(HANDLE hFile, WINPR_ATTR_UNUSED PDWORD lpEvtMask,
WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped)
{ {
WINPR_COMM* pComm = (WINPR_COMM*)hFile; WINPR_COMM* pComm = (WINPR_COMM*)hFile;

View File

@ -39,7 +39,8 @@
* request with a STATUS_SUCCESS status code. * request with a STATUS_SUCCESS status code.
*/ */
static BOOL set_serial_chars(WINPR_COMM* pComm, const SERIAL_CHARS* pSerialChars) static BOOL set_serial_chars(WINPR_ATTR_UNUSED WINPR_COMM* pComm,
WINPR_ATTR_UNUSED const SERIAL_CHARS* pSerialChars)
{ {
WINPR_ASSERT(pComm); WINPR_ASSERT(pComm);
WINPR_ASSERT(pSerialChars); WINPR_ASSERT(pSerialChars);
@ -47,7 +48,7 @@ static BOOL set_serial_chars(WINPR_COMM* pComm, const SERIAL_CHARS* pSerialChars
return TRUE; return TRUE;
} }
static BOOL get_serial_chars(WINPR_COMM* pComm, SERIAL_CHARS* pSerialChars) static BOOL get_serial_chars(WINPR_ATTR_UNUSED WINPR_COMM* pComm, SERIAL_CHARS* pSerialChars)
{ {
WINPR_ASSERT(pComm); WINPR_ASSERT(pComm);
WINPR_ASSERT(pSerialChars); WINPR_ASSERT(pSerialChars);

View File

@ -154,7 +154,7 @@ static const speed_t BAUD_TABLE[][3] = {
static BOOL commstatus_error(WINPR_COMM* pComm, const char* ctrl); static BOOL commstatus_error(WINPR_COMM* pComm, const char* ctrl);
static BOOL get_properties(WINPR_COMM* pComm, COMMPROP* pProperties) static BOOL get_properties(WINPR_ATTR_UNUSED WINPR_COMM* pComm, COMMPROP* pProperties)
{ {
WINPR_ASSERT(pComm); WINPR_ASSERT(pComm);
/* http://msdn.microsoft.com/en-us/library/windows/hardware/jj680684%28v=vs.85%29.aspx /* http://msdn.microsoft.com/en-us/library/windows/hardware/jj680684%28v=vs.85%29.aspx
@ -1128,7 +1128,7 @@ static BOOL get_wait_mask(WINPR_COMM* pComm, ULONG* pWaitMask)
return TRUE; return TRUE;
} }
static BOOL set_queue_size(WINPR_COMM* pComm, const SERIAL_QUEUE_SIZE* pQueueSize) static BOOL set_queue_size(WINPR_ATTR_UNUSED WINPR_COMM* pComm, const SERIAL_QUEUE_SIZE* pQueueSize)
{ {
WINPR_ASSERT(pComm); WINPR_ASSERT(pComm);
WINPR_ASSERT(pQueueSize); WINPR_ASSERT(pQueueSize);
@ -1606,7 +1606,7 @@ static BOOL get_dtrrts(WINPR_COMM* pComm, ULONG* pMask)
return TRUE; return TRUE;
} }
static BOOL config_size(WINPR_COMM* pComm, ULONG* pSize) static BOOL config_size(WINPR_ATTR_UNUSED WINPR_COMM* pComm, ULONG* pSize)
{ {
WINPR_ASSERT(pComm); WINPR_ASSERT(pComm);
WINPR_ASSERT(pSize); WINPR_ASSERT(pSize);
@ -1640,7 +1640,7 @@ static BOOL immediate_char(WINPR_COMM* pComm, const UCHAR* pChar)
return result; return result;
} }
static BOOL reset_device(WINPR_COMM* pComm) static BOOL reset_device(WINPR_ATTR_UNUSED WINPR_COMM* pComm)
{ {
/* http://msdn.microsoft.com/en-us/library/dn265347%28v=vs.85%29.aspx */ /* http://msdn.microsoft.com/en-us/library/dn265347%28v=vs.85%29.aspx */
return TRUE; return TRUE;

View File

@ -221,7 +221,8 @@ fail:
return newMemblock; return newMemblock;
} }
size_t winpr_aligned_msize(void* memblock, size_t alignment, size_t offset) size_t winpr_aligned_msize(void* memblock, WINPR_ATTR_UNUSED size_t alignment,
WINPR_ATTR_UNUSED size_t offset)
{ {
WINPR_ALIGNED_MEM* pMem = NULL; WINPR_ALIGNED_MEM* pMem = NULL;

View File

@ -26,7 +26,7 @@
#ifndef _WIN32 #ifndef _WIN32
errno_t _itoa_s(int value, char* buffer, size_t sizeInCharacters, int radix) errno_t _itoa_s(int value, char* buffer, size_t sizeInCharacters, WINPR_ATTR_UNUSED int radix)
{ {
int length = sprintf_s(NULL, 0, "%d", value); int length = sprintf_s(NULL, 0, "%d", value);

View File

@ -143,9 +143,10 @@ int int_MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
return cchWideChar; return cchWideChar;
} }
int int_WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, int int_WideCharToMultiByte(UINT CodePage, WINPR_ATTR_UNUSED DWORD dwFlags, LPCWSTR lpWideCharStr,
LPSTR lpMultiByteStr, int cbMultiByte, LPCSTR lpDefaultChar, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte,
LPBOOL lpUsedDefaultChar) WINPR_ATTR_UNUSED LPCSTR lpDefaultChar,
WINPR_ATTR_UNUSED LPBOOL lpUsedDefaultChar)
{ {
/* If cchWideChar is 0, the function fails */ /* If cchWideChar is 0, the function fails */

View File

@ -149,6 +149,7 @@
*/ */
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/wlog.h>
#include <winpr/wincrypt.h> #include <winpr/wincrypt.h>
#ifndef _WIN32 #ifndef _WIN32
@ -156,7 +157,8 @@
#include "crypto.h" #include "crypto.h"
HCERTSTORE CertOpenStore(LPCSTR lpszStoreProvider, DWORD dwMsgAndCertEncodingType, HCERTSTORE CertOpenStore(LPCSTR lpszStoreProvider, DWORD dwMsgAndCertEncodingType,
HCRYPTPROV_LEGACY hCryptProv, DWORD dwFlags, const void* pvPara) WINPR_ATTR_UNUSED HCRYPTPROV_LEGACY hCryptProv,
WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED const void* pvPara)
{ {
WINPR_CERTSTORE* certstore = NULL; WINPR_CERTSTORE* certstore = NULL;
@ -171,7 +173,8 @@ HCERTSTORE CertOpenStore(LPCSTR lpszStoreProvider, DWORD dwMsgAndCertEncodingTyp
return (HCERTSTORE)certstore; return (HCERTSTORE)certstore;
} }
HCERTSTORE CertOpenSystemStoreW(HCRYPTPROV_LEGACY hProv, LPCWSTR szSubsystemProtocol) HCERTSTORE CertOpenSystemStoreW(HCRYPTPROV_LEGACY hProv,
WINPR_ATTR_UNUSED LPCWSTR szSubsystemProtocol)
{ {
HCERTSTORE hCertStore = NULL; HCERTSTORE hCertStore = NULL;
@ -180,12 +183,13 @@ HCERTSTORE CertOpenSystemStoreW(HCRYPTPROV_LEGACY hProv, LPCWSTR szSubsystemProt
return hCertStore; return hCertStore;
} }
HCERTSTORE CertOpenSystemStoreA(HCRYPTPROV_LEGACY hProv, LPCSTR szSubsystemProtocol) HCERTSTORE CertOpenSystemStoreA(HCRYPTPROV_LEGACY hProv,
WINPR_ATTR_UNUSED LPCSTR szSubsystemProtocol)
{ {
return CertOpenSystemStoreW(hProv, NULL); return CertOpenSystemStoreW(hProv, NULL);
} }
BOOL CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) BOOL CertCloseStore(HCERTSTORE hCertStore, WINPR_ATTR_UNUSED DWORD dwFlags)
{ {
WINPR_CERTSTORE* certstore = NULL; WINPR_CERTSTORE* certstore = NULL;
@ -196,27 +200,39 @@ BOOL CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
return TRUE; return TRUE;
} }
PCCERT_CONTEXT CertFindCertificateInStore(HCERTSTORE hCertStore, DWORD dwCertEncodingType, PCCERT_CONTEXT CertFindCertificateInStore(WINPR_ATTR_UNUSED HCERTSTORE hCertStore,
DWORD dwFindFlags, DWORD dwFindType, WINPR_ATTR_UNUSED DWORD dwCertEncodingType,
const void* pvFindPara, PCCERT_CONTEXT pPrevCertContext) WINPR_ATTR_UNUSED DWORD dwFindFlags,
WINPR_ATTR_UNUSED DWORD dwFindType,
WINPR_ATTR_UNUSED const void* pvFindPara,
WINPR_ATTR_UNUSED PCCERT_CONTEXT pPrevCertContext)
{ {
WLog_ERR("TODO", "TODO: Implement");
return (PCCERT_CONTEXT)1; return (PCCERT_CONTEXT)1;
} }
PCCERT_CONTEXT CertEnumCertificatesInStore(HCERTSTORE hCertStore, PCCERT_CONTEXT pPrevCertContext) PCCERT_CONTEXT CertEnumCertificatesInStore(WINPR_ATTR_UNUSED HCERTSTORE hCertStore,
WINPR_ATTR_UNUSED PCCERT_CONTEXT pPrevCertContext)
{ {
WLog_ERR("TODO", "TODO: Implement");
return (PCCERT_CONTEXT)NULL; return (PCCERT_CONTEXT)NULL;
} }
DWORD CertGetNameStringW(PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void* pvTypePara, DWORD CertGetNameStringW(WINPR_ATTR_UNUSED PCCERT_CONTEXT pCertContext,
LPWSTR pszNameString, DWORD cchNameString) WINPR_ATTR_UNUSED DWORD dwType, WINPR_ATTR_UNUSED DWORD dwFlags,
WINPR_ATTR_UNUSED void* pvTypePara, WINPR_ATTR_UNUSED LPWSTR pszNameString,
WINPR_ATTR_UNUSED DWORD cchNameString)
{ {
WLog_ERR("TODO", "TODO: Implement");
return 0; return 0;
} }
DWORD CertGetNameStringA(PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void* pvTypePara, DWORD CertGetNameStringA(WINPR_ATTR_UNUSED PCCERT_CONTEXT pCertContext,
LPSTR pszNameString, DWORD cchNameString) WINPR_ATTR_UNUSED DWORD dwType, WINPR_ATTR_UNUSED DWORD dwFlags,
WINPR_ATTR_UNUSED void* pvTypePara, WINPR_ATTR_UNUSED LPSTR pszNameString,
WINPR_ATTR_UNUSED DWORD cchNameString)
{ {
WLog_ERR("TODO", "TODO: Implement");
return 0; return 0;
} }

View File

@ -581,8 +581,8 @@ WINPR_CIPHER_CTX* winpr_Cipher_New(WINPR_CIPHER_TYPE cipher, WINPR_CRYPTO_OPERAT
} }
WINPR_API WINPR_CIPHER_CTX* winpr_Cipher_NewEx(WINPR_CIPHER_TYPE cipher, WINPR_CRYPTO_OPERATION op, WINPR_API WINPR_CIPHER_CTX* winpr_Cipher_NewEx(WINPR_CIPHER_TYPE cipher, WINPR_CRYPTO_OPERATION op,
const void* key, size_t keylen, const void* iv, const void* key, WINPR_ATTR_UNUSED size_t keylen,
size_t ivlen) const void* iv, WINPR_ATTR_UNUSED size_t ivlen)
{ {
if (cipher == WINPR_CIPHER_ARC4_128) if (cipher == WINPR_CIPHER_ARC4_128)
{ {

View File

@ -18,7 +18,7 @@
*/ */
#include <winpr/config.h> #include <winpr/config.h>
#include <winpr/wlog.h>
#include <winpr/crypto.h> #include <winpr/crypto.h>
/** /**
@ -208,7 +208,7 @@ out:
return FALSE; return FALSE;
} }
BOOL CryptUnprotectMemory(LPVOID pData, DWORD cbData, DWORD dwFlags) BOOL CryptUnprotectMemory(LPVOID pData, WINPR_ATTR_UNUSED DWORD cbData, DWORD dwFlags)
{ {
BYTE* pPlainText = NULL; BYTE* pPlainText = NULL;
size_t cbOut = 0; size_t cbOut = 0;
@ -262,41 +262,58 @@ out:
return FALSE; return FALSE;
} }
BOOL CryptProtectData(DATA_BLOB* pDataIn, LPCWSTR szDataDescr, DATA_BLOB* pOptionalEntropy, BOOL CryptProtectData(WINPR_ATTR_UNUSED DATA_BLOB* pDataIn, WINPR_ATTR_UNUSED LPCWSTR szDataDescr,
PVOID pvReserved, CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct, DWORD dwFlags, WINPR_ATTR_UNUSED DATA_BLOB* pOptionalEntropy,
DATA_BLOB* pDataOut) WINPR_ATTR_UNUSED PVOID pvReserved,
WINPR_ATTR_UNUSED CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct,
WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED DATA_BLOB* pDataOut)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL CryptUnprotectData(DATA_BLOB* pDataIn, LPWSTR* ppszDataDescr, DATA_BLOB* pOptionalEntropy, BOOL CryptUnprotectData(WINPR_ATTR_UNUSED DATA_BLOB* pDataIn,
PVOID pvReserved, CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct, DWORD dwFlags, WINPR_ATTR_UNUSED LPWSTR* ppszDataDescr,
DATA_BLOB* pDataOut) WINPR_ATTR_UNUSED DATA_BLOB* pOptionalEntropy,
WINPR_ATTR_UNUSED PVOID pvReserved,
WINPR_ATTR_UNUSED CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct,
WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED DATA_BLOB* pDataOut)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL CryptStringToBinaryW(LPCWSTR pszString, DWORD cchString, DWORD dwFlags, BYTE* pbBinary, BOOL CryptStringToBinaryW(WINPR_ATTR_UNUSED LPCWSTR pszString, WINPR_ATTR_UNUSED DWORD cchString,
DWORD* pcbBinary, DWORD* pdwSkip, DWORD* pdwFlags) WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED BYTE* pbBinary,
WINPR_ATTR_UNUSED DWORD* pcbBinary, WINPR_ATTR_UNUSED DWORD* pdwSkip,
WINPR_ATTR_UNUSED DWORD* pdwFlags)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL CryptStringToBinaryA(LPCSTR pszString, DWORD cchString, DWORD dwFlags, BYTE* pbBinary, BOOL CryptStringToBinaryA(WINPR_ATTR_UNUSED LPCSTR pszString, WINPR_ATTR_UNUSED DWORD cchString,
DWORD* pcbBinary, DWORD* pdwSkip, DWORD* pdwFlags) WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED BYTE* pbBinary,
WINPR_ATTR_UNUSED DWORD* pcbBinary, WINPR_ATTR_UNUSED DWORD* pdwSkip,
WINPR_ATTR_UNUSED DWORD* pdwFlags)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL CryptBinaryToStringW(CONST BYTE* pbBinary, DWORD cbBinary, DWORD dwFlags, LPWSTR pszString, BOOL CryptBinaryToStringW(WINPR_ATTR_UNUSED CONST BYTE* pbBinary, WINPR_ATTR_UNUSED DWORD cbBinary,
DWORD* pcchString) WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED LPWSTR pszString,
WINPR_ATTR_UNUSED DWORD* pcchString)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL CryptBinaryToStringA(CONST BYTE* pbBinary, DWORD cbBinary, DWORD dwFlags, LPSTR pszString, BOOL CryptBinaryToStringA(WINPR_ATTR_UNUSED CONST BYTE* pbBinary, WINPR_ATTR_UNUSED DWORD cbBinary,
DWORD* pcchString) WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED LPSTR pszString,
WINPR_ATTR_UNUSED DWORD* pcchString)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }

View File

@ -631,7 +631,7 @@ BOOL winpr_Digest_Update(WINPR_DIGEST_CTX* ctx, const void* input, size_t ilen)
return TRUE; return TRUE;
} }
BOOL winpr_Digest_Final(WINPR_DIGEST_CTX* ctx, void* output, size_t olen) BOOL winpr_Digest_Final(WINPR_DIGEST_CTX* ctx, void* output, WINPR_ATTR_UNUSED size_t olen)
{ {
WINPR_ASSERT(ctx); WINPR_ASSERT(ctx);

View File

@ -26,6 +26,7 @@
#include <winpr/error.h> #include <winpr/error.h>
#include <winpr/file.h> #include <winpr/file.h>
#include <winpr/string.h> #include <winpr/string.h>
#include <winpr/wlog.h>
#include <winpr/environment.h> #include <winpr/environment.h>
@ -97,50 +98,61 @@ DWORD GetCurrentDirectoryA(DWORD nBufferLength, LPSTR lpBuffer)
} }
} }
DWORD GetCurrentDirectoryW(DWORD nBufferLength, LPWSTR lpBuffer) DWORD GetCurrentDirectoryW(WINPR_ATTR_UNUSED DWORD nBufferLength, WINPR_ATTR_UNUSED LPWSTR lpBuffer)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return 0; return 0;
} }
BOOL SetCurrentDirectoryA(LPCSTR lpPathName) BOOL SetCurrentDirectoryA(WINPR_ATTR_UNUSED LPCSTR lpPathName)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return TRUE; return TRUE;
} }
BOOL SetCurrentDirectoryW(LPCWSTR lpPathName) BOOL SetCurrentDirectoryW(WINPR_ATTR_UNUSED LPCWSTR lpPathName)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return TRUE; return TRUE;
} }
DWORD SearchPathA(LPCSTR lpPath, LPCSTR lpFileName, LPCSTR lpExtension, DWORD nBufferLength, DWORD SearchPathA(WINPR_ATTR_UNUSED LPCSTR lpPath, WINPR_ATTR_UNUSED LPCSTR lpFileName,
LPSTR lpBuffer, LPSTR* lpFilePart) WINPR_ATTR_UNUSED LPCSTR lpExtension, WINPR_ATTR_UNUSED DWORD nBufferLength,
WINPR_ATTR_UNUSED LPSTR lpBuffer, WINPR_ATTR_UNUSED LPSTR* lpFilePart)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return 0; return 0;
} }
DWORD SearchPathW(LPCWSTR lpPath, LPCWSTR lpFileName, LPCWSTR lpExtension, DWORD nBufferLength, DWORD SearchPathW(WINPR_ATTR_UNUSED LPCWSTR lpPath, WINPR_ATTR_UNUSED LPCWSTR lpFileName,
LPWSTR lpBuffer, LPWSTR* lpFilePart) WINPR_ATTR_UNUSED LPCWSTR lpExtension, WINPR_ATTR_UNUSED DWORD nBufferLength,
WINPR_ATTR_UNUSED LPWSTR lpBuffer, WINPR_ATTR_UNUSED LPWSTR* lpFilePart)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return 0; return 0;
} }
LPSTR GetCommandLineA(VOID) LPSTR GetCommandLineA(VOID)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return NULL; return NULL;
} }
LPWSTR GetCommandLineW(VOID) LPWSTR GetCommandLineW(VOID)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return NULL; return NULL;
} }
BOOL NeedCurrentDirectoryForExePathA(LPCSTR ExeName) BOOL NeedCurrentDirectoryForExePathA(WINPR_ATTR_UNUSED LPCSTR ExeName)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return TRUE; return TRUE;
} }
BOOL NeedCurrentDirectoryForExePathW(LPCWSTR ExeName) BOOL NeedCurrentDirectoryForExePathW(WINPR_ATTR_UNUSED LPCWSTR ExeName)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return TRUE; return TRUE;
} }
@ -177,8 +189,10 @@ DWORD GetEnvironmentVariableA(LPCSTR lpName, LPSTR lpBuffer, DWORD nSize)
#endif #endif
} }
DWORD GetEnvironmentVariableW(LPCWSTR lpName, LPWSTR lpBuffer, DWORD nSize) DWORD GetEnvironmentVariableW(WINPR_ATTR_UNUSED LPCWSTR lpName, WINPR_ATTR_UNUSED LPWSTR lpBuffer,
WINPR_ATTR_UNUSED DWORD nSize)
{ {
WLog_ERR("TODO", "TODO: not implemented");
SetLastError(ERROR_ENVVAR_NOT_FOUND); SetLastError(ERROR_ENVVAR_NOT_FOUND);
return 0; return 0;
} }
@ -208,8 +222,9 @@ BOOL SetEnvironmentVariableA(LPCSTR lpName, LPCSTR lpValue)
#endif #endif
} }
BOOL SetEnvironmentVariableW(LPCWSTR lpName, LPCWSTR lpValue) BOOL SetEnvironmentVariableW(WINPR_ATTR_UNUSED LPCWSTR lpName, WINPR_ATTR_UNUSED LPCWSTR lpValue)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return FALSE; return FALSE;
} }
@ -289,26 +304,33 @@ LPCH GetEnvironmentStringsA(VOID)
LPWCH GetEnvironmentStringsW(VOID) LPWCH GetEnvironmentStringsW(VOID)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return NULL; return NULL;
} }
BOOL SetEnvironmentStringsA(LPCH NewEnvironment) BOOL SetEnvironmentStringsA(WINPR_ATTR_UNUSED LPCH NewEnvironment)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return TRUE; return TRUE;
} }
BOOL SetEnvironmentStringsW(LPWCH NewEnvironment) BOOL SetEnvironmentStringsW(WINPR_ATTR_UNUSED LPWCH NewEnvironment)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return TRUE; return TRUE;
} }
DWORD ExpandEnvironmentStringsA(LPCSTR lpSrc, LPSTR lpDst, DWORD nSize) DWORD ExpandEnvironmentStringsA(WINPR_ATTR_UNUSED LPCSTR lpSrc, WINPR_ATTR_UNUSED LPSTR lpDst,
WINPR_ATTR_UNUSED DWORD nSize)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return 0; return 0;
} }
DWORD ExpandEnvironmentStringsW(LPCWSTR lpSrc, LPWSTR lpDst, DWORD nSize) DWORD ExpandEnvironmentStringsW(WINPR_ATTR_UNUSED LPCWSTR lpSrc, WINPR_ATTR_UNUSED LPWSTR lpDst,
WINPR_ATTR_UNUSED DWORD nSize)
{ {
WLog_ERR("TODO", "TODO: not implemented");
return 0; return 0;
} }

View File

@ -20,6 +20,7 @@
#include <winpr/config.h> #include <winpr/config.h>
#include <winpr/error.h> #include <winpr/error.h>
#include <winpr/wlog.h>
#ifndef _WIN32 #ifndef _WIN32
@ -29,11 +30,13 @@
UINT GetErrorMode(void) UINT GetErrorMode(void)
{ {
WLog_ERR("TODO", "TOdO: implement");
return 0; return 0;
} }
UINT SetErrorMode(UINT uMode) UINT SetErrorMode(WINPR_ATTR_UNUSED UINT uMode)
{ {
WLog_ERR("TODO", "TOdO: implement");
return 0; return 0;
} }
@ -56,43 +59,56 @@ VOID SetLastError(DWORD dwErrCode)
} }
} }
VOID RestoreLastError(DWORD dwErrCode) VOID RestoreLastError(WINPR_ATTR_UNUSED DWORD dwErrCode)
{ {
WLog_ERR("TODO", "TOdO: implement");
} }
VOID RaiseException(DWORD dwExceptionCode, DWORD dwExceptionFlags, DWORD nNumberOfArguments, VOID RaiseException(WINPR_ATTR_UNUSED DWORD dwExceptionCode,
CONST ULONG_PTR* lpArguments) WINPR_ATTR_UNUSED DWORD dwExceptionFlags,
WINPR_ATTR_UNUSED DWORD nNumberOfArguments,
WINPR_ATTR_UNUSED CONST ULONG_PTR* lpArguments)
{ {
WLog_ERR("TODO", "TOdO: implement");
} }
LONG UnhandledExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo) LONG UnhandledExceptionFilter(WINPR_ATTR_UNUSED PEXCEPTION_POINTERS ExceptionInfo)
{ {
WLog_ERR("TODO", "TOdO: implement");
return 0; return 0;
} }
LPTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER
SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter) SetUnhandledExceptionFilter(
WINPR_ATTR_UNUSED LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter)
{ {
WLog_ERR("TODO", "TOdO: implement");
return NULL; return NULL;
} }
PVOID AddVectoredExceptionHandler(ULONG First, PVECTORED_EXCEPTION_HANDLER Handler) PVOID AddVectoredExceptionHandler(WINPR_ATTR_UNUSED ULONG First,
WINPR_ATTR_UNUSED PVECTORED_EXCEPTION_HANDLER Handler)
{ {
WLog_ERR("TODO", "TOdO: implement");
return NULL; return NULL;
} }
ULONG RemoveVectoredExceptionHandler(PVOID Handle) ULONG RemoveVectoredExceptionHandler(WINPR_ATTR_UNUSED PVOID Handle)
{ {
WLog_ERR("TODO", "TOdO: implement");
return 0; return 0;
} }
PVOID AddVectoredContinueHandler(ULONG First, PVECTORED_EXCEPTION_HANDLER Handler) PVOID AddVectoredContinueHandler(WINPR_ATTR_UNUSED ULONG First,
WINPR_ATTR_UNUSED PVECTORED_EXCEPTION_HANDLER Handler)
{ {
WLog_ERR("TODO", "TOdO: implement");
return NULL; return NULL;
} }
ULONG RemoveVectoredContinueHandler(PVOID Handle) ULONG RemoveVectoredContinueHandler(WINPR_ATTR_UNUSED PVOID Handle)
{ {
WLog_ERR("TODO", "TOdO: implement");
return 0; return 0;
} }

View File

@ -390,8 +390,9 @@ static BOOL FileGetFileInformationByHandle(HANDLE hFile,
return TRUE; return TRUE;
} }
static BOOL FileLockFileEx(HANDLE hFile, DWORD dwFlags, DWORD dwReserved, static BOOL FileLockFileEx(HANDLE hFile, DWORD dwFlags, WINPR_ATTR_UNUSED DWORD dwReserved,
DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh, WINPR_ATTR_UNUSED DWORD nNumberOfBytesToLockLow,
WINPR_ATTR_UNUSED DWORD nNumberOfBytesToLockHigh,
LPOVERLAPPED lpOverlapped) LPOVERLAPPED lpOverlapped)
{ {
#ifdef __sun #ifdef __sun
@ -463,8 +464,10 @@ static BOOL FileLockFileEx(HANDLE hFile, DWORD dwFlags, DWORD dwReserved,
return TRUE; return TRUE;
} }
static BOOL FileUnlockFile(HANDLE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh, static BOOL FileUnlockFile(HANDLE hFile, WINPR_ATTR_UNUSED DWORD dwFileOffsetLow,
DWORD nNumberOfBytesToUnlockLow, DWORD nNumberOfBytesToUnlockHigh) WINPR_ATTR_UNUSED DWORD dwFileOffsetHigh,
WINPR_ATTR_UNUSED DWORD nNumberOfBytesToUnlockLow,
WINPR_ATTR_UNUSED DWORD nNumberOfBytesToUnlockHigh)
{ {
WINPR_FILE* pFile = (WINPR_FILE*)hFile; WINPR_FILE* pFile = (WINPR_FILE*)hFile;
#ifdef __sun #ifdef __sun
@ -506,8 +509,10 @@ static BOOL FileUnlockFile(HANDLE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffs
return TRUE; return TRUE;
} }
static BOOL FileUnlockFileEx(HANDLE hFile, DWORD dwReserved, DWORD nNumberOfBytesToUnlockLow, static BOOL FileUnlockFileEx(HANDLE hFile, WINPR_ATTR_UNUSED DWORD dwReserved,
DWORD nNumberOfBytesToUnlockHigh, LPOVERLAPPED lpOverlapped) WINPR_ATTR_UNUSED DWORD nNumberOfBytesToUnlockLow,
WINPR_ATTR_UNUSED DWORD nNumberOfBytesToUnlockHigh,
LPOVERLAPPED lpOverlapped)
{ {
WINPR_FILE* pFile = (WINPR_FILE*)hFile; WINPR_FILE* pFile = (WINPR_FILE*)hFile;
#ifdef __sun #ifdef __sun
@ -575,7 +580,7 @@ static struct timespec filetimeToTimespec(const FILETIME* ftime)
return ts; return ts;
} }
static BOOL FileSetFileTime(HANDLE hFile, const FILETIME* lpCreationTime, static BOOL FileSetFileTime(HANDLE hFile, WINPR_ATTR_UNUSED const FILETIME* lpCreationTime,
const FILETIME* lpLastAccessTime, const FILETIME* lpLastWriteTime) const FILETIME* lpLastAccessTime, const FILETIME* lpLastWriteTime)
{ {
struct timespec times[2] = { { UTIME_OMIT, UTIME_OMIT }, struct timespec times[2] = { { UTIME_OMIT, UTIME_OMIT },
@ -971,7 +976,7 @@ static HANDLE FileCreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dw
return pFile; return pFile;
} }
static BOOL IsFileDevice(LPCTSTR lpDeviceName) static BOOL IsFileDevice(WINPR_ATTR_UNUSED LPCTSTR lpDeviceName)
{ {
return TRUE; return TRUE;
} }
@ -1029,12 +1034,13 @@ HANDLE GetStdHandle(DWORD nStdHandle)
return (HANDLE)pFile; return (HANDLE)pFile;
} }
BOOL SetStdHandle(DWORD nStdHandle, HANDLE hHandle) BOOL SetStdHandle(WINPR_ATTR_UNUSED DWORD nStdHandle, WINPR_ATTR_UNUSED HANDLE hHandle)
{ {
return FALSE; return FALSE;
} }
BOOL SetStdHandleEx(DWORD dwStdHandle, HANDLE hNewHandle, HANDLE* phOldHandle) BOOL SetStdHandleEx(WINPR_ATTR_UNUSED DWORD dwStdHandle, WINPR_ATTR_UNUSED HANDLE hNewHandle,
WINPR_ATTR_UNUSED HANDLE* phOldHandle)
{ {
return FALSE; return FALSE;
} }

View File

@ -22,6 +22,7 @@
#include <winpr/config.h> #include <winpr/config.h>
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/wlog.h>
#include <winpr/string.h> #include <winpr/string.h>
#include <winpr/path.h> #include <winpr/path.h>
#include <winpr/file.h> #include <winpr/file.h>
@ -470,7 +471,8 @@ BOOL FlushFileBuffers(HANDLE hFile)
return FALSE; return FALSE;
} }
BOOL WINAPI GetFileAttributesExA(LPCSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, BOOL WINAPI GetFileAttributesExA(LPCSTR lpFileName,
WINPR_ATTR_UNUSED GET_FILEEX_INFO_LEVELS fInfoLevelId,
LPVOID lpFileInformation) LPVOID lpFileInformation)
{ {
LPWIN32_FILE_ATTRIBUTE_DATA fd = lpFileInformation; LPWIN32_FILE_ATTRIBUTE_DATA fd = lpFileInformation;
@ -1057,7 +1059,8 @@ HANDLE FindFirstFileW(LPCWSTR lpFileName, LPWIN32_FIND_DATAW lpFindFileData)
LPSTR utfFileName = NULL; LPSTR utfFileName = NULL;
HANDLE h = NULL; HANDLE h = NULL;
if (!lpFileName) if (!lpFileName)
return FALSE; return INVALID_HANDLE_VALUE;
LPWIN32_FIND_DATAA fd = (LPWIN32_FIND_DATAA)calloc(1, sizeof(WIN32_FIND_DATAA)); LPWIN32_FIND_DATAA fd = (LPWIN32_FIND_DATAA)calloc(1, sizeof(WIN32_FIND_DATAA));
if (!fd) if (!fd)
@ -1093,15 +1096,25 @@ out:
return h; return h;
} }
HANDLE FindFirstFileExA(LPCSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, HANDLE FindFirstFileExA(WINPR_ATTR_UNUSED LPCSTR lpFileName,
FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags) WINPR_ATTR_UNUSED FINDEX_INFO_LEVELS fInfoLevelId,
WINPR_ATTR_UNUSED LPVOID lpFindFileData,
WINPR_ATTR_UNUSED FINDEX_SEARCH_OPS fSearchOp,
WINPR_ATTR_UNUSED LPVOID lpSearchFilter,
WINPR_ATTR_UNUSED DWORD dwAdditionalFlags)
{ {
WLog_ERR("TODO", "TODO: Implement");
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
HANDLE FindFirstFileExW(LPCWSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, HANDLE FindFirstFileExW(WINPR_ATTR_UNUSED LPCWSTR lpFileName,
FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags) WINPR_ATTR_UNUSED FINDEX_INFO_LEVELS fInfoLevelId,
WINPR_ATTR_UNUSED LPVOID lpFindFileData,
WINPR_ATTR_UNUSED FINDEX_SEARCH_OPS fSearchOp,
WINPR_ATTR_UNUSED LPVOID lpSearchFilter,
WINPR_ATTR_UNUSED DWORD dwAdditionalFlags)
{ {
WLog_ERR("TODO", "TODO: Implement");
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
@ -1222,7 +1235,8 @@ BOOL FindClose(HANDLE hFindFile)
return TRUE; return TRUE;
} }
BOOL CreateDirectoryA(LPCSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes) BOOL CreateDirectoryA(LPCSTR lpPathName,
WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{ {
if (!mkdir(lpPathName, S_IRUSR | S_IWUSR | S_IXUSR)) if (!mkdir(lpPathName, S_IRUSR | S_IWUSR | S_IXUSR))
return TRUE; return TRUE;

View File

@ -116,11 +116,12 @@ static HANDLE_OPS ops = {
NULL, /* FileGetFileInformationByHandle */ NULL, /* FileGetFileInformationByHandle */
}; };
static HANDLE NamedPipeClientCreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, static HANDLE
DWORD dwShareMode, NamedPipeClientCreateFileA(LPCSTR lpFileName, WINPR_ATTR_UNUSED DWORD dwDesiredAccess,
LPSECURITY_ATTRIBUTES lpSecurityAttributes, WINPR_ATTR_UNUSED DWORD dwShareMode,
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes,
HANDLE hTemplateFile) WINPR_ATTR_UNUSED DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes, WINPR_ATTR_UNUSED HANDLE hTemplateFile)
{ {
int status = 0; int status = 0;
struct sockaddr_un s = { 0 }; struct sockaddr_un s = { 0 };

View File

@ -60,21 +60,27 @@ BOOL CloseHandle(HANDLE hObject)
return FALSE; return FALSE;
} }
BOOL DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle, HANDLE hTargetProcessHandle, BOOL DuplicateHandle(WINPR_ATTR_UNUSED HANDLE hSourceProcessHandle,
LPHANDLE lpTargetHandle, DWORD dwDesiredAccess, BOOL bInheritHandle, WINPR_ATTR_UNUSED HANDLE hSourceHandle,
DWORD dwOptions) WINPR_ATTR_UNUSED HANDLE hTargetProcessHandle,
WINPR_ATTR_UNUSED LPHANDLE lpTargetHandle,
WINPR_ATTR_UNUSED DWORD dwDesiredAccess, WINPR_ATTR_UNUSED BOOL bInheritHandle,
WINPR_ATTR_UNUSED DWORD dwOptions)
{ {
*((ULONG_PTR*)lpTargetHandle) = (ULONG_PTR)hSourceHandle; *((ULONG_PTR*)lpTargetHandle) = (ULONG_PTR)hSourceHandle;
return TRUE; return TRUE;
} }
BOOL GetHandleInformation(HANDLE hObject, LPDWORD lpdwFlags) BOOL GetHandleInformation(WINPR_ATTR_UNUSED HANDLE hObject, WINPR_ATTR_UNUSED LPDWORD lpdwFlags)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL SetHandleInformation(HANDLE hObject, DWORD dwMask, DWORD dwFlags) BOOL SetHandleInformation(WINPR_ATTR_UNUSED HANDLE hObject, WINPR_ATTR_UNUSED DWORD dwMask,
WINPR_ATTR_UNUSED DWORD dwFlags)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }

View File

@ -20,6 +20,7 @@
#include <winpr/config.h> #include <winpr/config.h>
#include <winpr/assert.h> #include <winpr/assert.h>
#include <winpr/wlog.h>
#include <winpr/platform.h> #include <winpr/platform.h>
#include <winpr/synch.h> #include <winpr/synch.h>
#include <winpr/handle.h> #include <winpr/handle.h>
@ -97,13 +98,16 @@ WINPR_PSLIST_ENTRY InterlockedPushEntrySList(WINPR_PSLIST_HEADER ListHead,
#endif #endif
} }
WINPR_PSLIST_ENTRY InterlockedPushListSListEx(WINPR_PSLIST_HEADER ListHead, WINPR_PSLIST_ENTRY List, WINPR_PSLIST_ENTRY InterlockedPushListSListEx(WINPR_ATTR_UNUSED WINPR_PSLIST_HEADER ListHead,
WINPR_PSLIST_ENTRY ListEnd, ULONG Count) WINPR_ATTR_UNUSED WINPR_PSLIST_ENTRY List,
WINPR_ATTR_UNUSED WINPR_PSLIST_ENTRY ListEnd,
WINPR_ATTR_UNUSED ULONG Count)
{ {
WINPR_ASSERT(ListHead); WINPR_ASSERT(ListHead);
WINPR_ASSERT(List); WINPR_ASSERT(List);
WINPR_ASSERT(ListEnd); WINPR_ASSERT(ListEnd);
WLog_ERR("TODO", "TODO: implement");
#ifdef _WIN64 #ifdef _WIN64
#else #else

View File

@ -120,10 +120,11 @@ static char* GetDeviceFileUnixDomainSocketFilePathA(LPCSTR lpName)
* http://msdn.microsoft.com/en-us/library/windows/hardware/ff548397/ * http://msdn.microsoft.com/en-us/library/windows/hardware/ff548397/
*/ */
NTSTATUS _IoCreateDeviceEx(PDRIVER_OBJECT_EX DriverObject, ULONG DeviceExtensionSize, NTSTATUS _IoCreateDeviceEx(WINPR_ATTR_UNUSED PDRIVER_OBJECT_EX DriverObject,
PUNICODE_STRING DeviceName, DEVICE_TYPE DeviceType, WINPR_ATTR_UNUSED ULONG DeviceExtensionSize, PUNICODE_STRING DeviceName,
ULONG DeviceCharacteristics, BOOLEAN Exclusive, WINPR_ATTR_UNUSED DEVICE_TYPE DeviceType,
PDEVICE_OBJECT_EX* DeviceObject) WINPR_ATTR_UNUSED ULONG DeviceCharacteristics,
WINPR_ATTR_UNUSED BOOLEAN Exclusive, PDEVICE_OBJECT_EX* DeviceObject)
{ {
int status = 0; int status = 0;
char* DeviceBasePath = NULL; char* DeviceBasePath = NULL;

View File

@ -48,8 +48,10 @@
#define TAG WINPR_TAG("io") #define TAG WINPR_TAG("io")
BOOL GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped, BOOL GetOverlappedResult(WINPR_ATTR_UNUSED HANDLE hFile,
LPDWORD lpNumberOfBytesTransferred, BOOL bWait) WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped,
WINPR_ATTR_UNUSED LPDWORD lpNumberOfBytesTransferred,
WINPR_ATTR_UNUSED BOOL bWait)
{ {
#if 1 #if 1
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
@ -127,73 +129,86 @@ BOOL GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped,
#endif #endif
} }
BOOL GetOverlappedResultEx(HANDLE hFile, LPOVERLAPPED lpOverlapped, BOOL GetOverlappedResultEx(WINPR_ATTR_UNUSED HANDLE hFile,
LPDWORD lpNumberOfBytesTransferred, DWORD dwMilliseconds, WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped,
BOOL bAlertable) WINPR_ATTR_UNUSED LPDWORD lpNumberOfBytesTransferred,
WINPR_ATTR_UNUSED DWORD dwMilliseconds,
WINPR_ATTR_UNUSED BOOL bAlertable)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
BOOL DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, BOOL DeviceIoControl(WINPR_ATTR_UNUSED HANDLE hDevice, WINPR_ATTR_UNUSED DWORD dwIoControlCode,
LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, WINPR_ATTR_UNUSED LPVOID lpInBuffer, WINPR_ATTR_UNUSED DWORD nInBufferSize,
LPOVERLAPPED lpOverlapped) WINPR_ATTR_UNUSED LPVOID lpOutBuffer, WINPR_ATTR_UNUSED DWORD nOutBufferSize,
WINPR_ATTR_UNUSED LPDWORD lpBytesReturned,
WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
HANDLE CreateIoCompletionPort(HANDLE FileHandle, HANDLE ExistingCompletionPort, HANDLE CreateIoCompletionPort(WINPR_ATTR_UNUSED HANDLE FileHandle,
ULONG_PTR CompletionKey, DWORD NumberOfConcurrentThreads) WINPR_ATTR_UNUSED HANDLE ExistingCompletionPort,
WINPR_ATTR_UNUSED ULONG_PTR CompletionKey,
WINPR_ATTR_UNUSED DWORD NumberOfConcurrentThreads)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL; return NULL;
} }
BOOL GetQueuedCompletionStatus(HANDLE CompletionPort, LPDWORD lpNumberOfBytesTransferred, BOOL GetQueuedCompletionStatus(WINPR_ATTR_UNUSED HANDLE CompletionPort,
PULONG_PTR lpCompletionKey, LPOVERLAPPED* lpOverlapped, WINPR_ATTR_UNUSED LPDWORD lpNumberOfBytesTransferred,
DWORD dwMilliseconds) WINPR_ATTR_UNUSED PULONG_PTR lpCompletionKey,
WINPR_ATTR_UNUSED LPOVERLAPPED* lpOverlapped,
WINPR_ATTR_UNUSED DWORD dwMilliseconds)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
BOOL GetQueuedCompletionStatusEx(HANDLE CompletionPort, LPOVERLAPPED_ENTRY lpCompletionPortEntries, BOOL GetQueuedCompletionStatusEx(WINPR_ATTR_UNUSED HANDLE CompletionPort,
ULONG ulCount, PULONG ulNumEntriesRemoved, DWORD dwMilliseconds, WINPR_ATTR_UNUSED LPOVERLAPPED_ENTRY lpCompletionPortEntries,
BOOL fAlertable) WINPR_ATTR_UNUSED ULONG ulCount,
WINPR_ATTR_UNUSED PULONG ulNumEntriesRemoved,
WINPR_ATTR_UNUSED DWORD dwMilliseconds,
WINPR_ATTR_UNUSED BOOL fAlertable)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
BOOL PostQueuedCompletionStatus(HANDLE CompletionPort, DWORD dwNumberOfBytesTransferred, BOOL PostQueuedCompletionStatus(WINPR_ATTR_UNUSED HANDLE CompletionPort,
ULONG_PTR dwCompletionKey, LPOVERLAPPED lpOverlapped) WINPR_ATTR_UNUSED DWORD dwNumberOfBytesTransferred,
WINPR_ATTR_UNUSED ULONG_PTR dwCompletionKey,
WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
BOOL CancelIo(HANDLE hFile) BOOL CancelIo(WINPR_ATTR_UNUSED HANDLE hFile)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
BOOL CancelIoEx(HANDLE hFile, LPOVERLAPPED lpOverlapped) BOOL CancelIoEx(WINPR_ATTR_UNUSED HANDLE hFile, WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
BOOL CancelSynchronousIo(HANDLE hThread) BOOL CancelSynchronousIo(WINPR_ATTR_UNUSED HANDLE hThread)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View File

@ -83,7 +83,7 @@
#endif #endif
DLL_DIRECTORY_COOKIE AddDllDirectory(PCWSTR NewDirectory) DLL_DIRECTORY_COOKIE AddDllDirectory(WINPR_ATTR_UNUSED PCWSTR NewDirectory)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
@ -91,7 +91,7 @@ DLL_DIRECTORY_COOKIE AddDllDirectory(PCWSTR NewDirectory)
return NULL; return NULL;
} }
BOOL RemoveDllDirectory(DLL_DIRECTORY_COOKIE Cookie) BOOL RemoveDllDirectory(WINPR_ATTR_UNUSED DLL_DIRECTORY_COOKIE Cookie)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
@ -99,7 +99,7 @@ BOOL RemoveDllDirectory(DLL_DIRECTORY_COOKIE Cookie)
return FALSE; return FALSE;
} }
BOOL SetDefaultDllDirectories(DWORD DirectoryFlags) BOOL SetDefaultDllDirectories(WINPR_ATTR_UNUSED DWORD DirectoryFlags)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
@ -210,7 +210,7 @@ BOOL FreeLibrary(HMODULE hLibModule)
return TRUE; return TRUE;
} }
HMODULE GetModuleHandleA(LPCSTR lpModuleName) HMODULE GetModuleHandleA(WINPR_ATTR_UNUSED LPCSTR lpModuleName)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
@ -218,7 +218,7 @@ HMODULE GetModuleHandleA(LPCSTR lpModuleName)
return NULL; return NULL;
} }
HMODULE GetModuleHandleW(LPCWSTR lpModuleName) HMODULE GetModuleHandleW(WINPR_ATTR_UNUSED LPCWSTR lpModuleName)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");

View File

@ -20,6 +20,7 @@
#include <winpr/config.h> #include <winpr/config.h>
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/wlog.h>
#include <winpr/memory.h> #include <winpr/memory.h>
@ -76,9 +77,13 @@
#include "memory.h" #include "memory.h"
HANDLE CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWORD flProtect, HANDLE CreateFileMappingA(WINPR_ATTR_UNUSED HANDLE hFile,
DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCSTR lpName) WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpAttributes,
WINPR_ATTR_UNUSED DWORD flProtect,
WINPR_ATTR_UNUSED DWORD dwMaximumSizeHigh,
WINPR_ATTR_UNUSED DWORD dwMaximumSizeLow, WINPR_ATTR_UNUSED LPCSTR lpName)
{ {
WLog_ERR("TODO", "TODO: Implement");
if (hFile != INVALID_HANDLE_VALUE) if (hFile != INVALID_HANDLE_VALUE)
{ {
return NULL; /* not yet implemented */ return NULL; /* not yet implemented */
@ -87,41 +92,62 @@ HANDLE CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWOR
return NULL; return NULL;
} }
HANDLE CreateFileMappingW(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWORD flProtect, HANDLE CreateFileMappingW(WINPR_ATTR_UNUSED HANDLE hFile,
DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCWSTR lpName) WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpAttributes,
WINPR_ATTR_UNUSED DWORD flProtect,
WINPR_ATTR_UNUSED DWORD dwMaximumSizeHigh,
WINPR_ATTR_UNUSED DWORD dwMaximumSizeLow,
WINPR_ATTR_UNUSED LPCWSTR lpName)
{ {
WLog_ERR("TODO", "TODO: Implement");
return NULL; return NULL;
} }
HANDLE OpenFileMappingA(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName) HANDLE OpenFileMappingA(WINPR_ATTR_UNUSED DWORD dwDesiredAccess,
WINPR_ATTR_UNUSED BOOL bInheritHandle, WINPR_ATTR_UNUSED LPCSTR lpName)
{ {
WLog_ERR("TODO", "TODO: Implement");
return NULL; return NULL;
} }
HANDLE OpenFileMappingW(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName) HANDLE OpenFileMappingW(WINPR_ATTR_UNUSED DWORD dwDesiredAccess,
WINPR_ATTR_UNUSED BOOL bInheritHandle, WINPR_ATTR_UNUSED LPCWSTR lpName)
{ {
WLog_ERR("TODO", "TODO: Implement");
return NULL; return NULL;
} }
LPVOID MapViewOfFile(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, LPVOID MapViewOfFile(WINPR_ATTR_UNUSED HANDLE hFileMappingObject,
DWORD dwFileOffsetLow, size_t dwNumberOfBytesToMap) WINPR_ATTR_UNUSED DWORD dwDesiredAccess,
WINPR_ATTR_UNUSED DWORD dwFileOffsetHigh,
WINPR_ATTR_UNUSED DWORD dwFileOffsetLow,
WINPR_ATTR_UNUSED size_t dwNumberOfBytesToMap)
{ {
WLog_ERR("TODO", "TODO: Implement");
return NULL; return NULL;
} }
LPVOID MapViewOfFileEx(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, LPVOID MapViewOfFileEx(WINPR_ATTR_UNUSED HANDLE hFileMappingObject,
DWORD dwFileOffsetLow, size_t dwNumberOfBytesToMap, LPVOID lpBaseAddress) WINPR_ATTR_UNUSED DWORD dwDesiredAccess,
WINPR_ATTR_UNUSED DWORD dwFileOffsetHigh,
WINPR_ATTR_UNUSED DWORD dwFileOffsetLow,
WINPR_ATTR_UNUSED size_t dwNumberOfBytesToMap,
WINPR_ATTR_UNUSED LPVOID lpBaseAddress)
{ {
WLog_ERR("TODO", "TODO: Implement");
return NULL; return NULL;
} }
BOOL FlushViewOfFile(LPCVOID lpBaseAddress, size_t dwNumberOfBytesToFlush) BOOL FlushViewOfFile(WINPR_ATTR_UNUSED LPCVOID lpBaseAddress,
WINPR_ATTR_UNUSED size_t dwNumberOfBytesToFlush)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL UnmapViewOfFile(LPCVOID lpBaseAddress) BOOL UnmapViewOfFile(WINPR_ATTR_UNUSED LPCVOID lpBaseAddress)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }

View File

@ -99,7 +99,8 @@ SECURITY_STATUS winpr_NCryptDefault_dtor(NCRYPT_HANDLE handle)
} }
SECURITY_STATUS NCryptEnumStorageProviders(DWORD* wProviderCount, SECURITY_STATUS NCryptEnumStorageProviders(DWORD* wProviderCount,
NCryptProviderName** ppProviderList, DWORD dwFlags) NCryptProviderName** ppProviderList,
WINPR_ATTR_UNUSED DWORD dwFlags)
{ {
NCryptProviderName* ret = NULL; NCryptProviderName* ret = NULL;
size_t stringAllocSize = 0; size_t stringAllocSize = 0;

View File

@ -660,7 +660,7 @@ static SECURITY_STATUS parseKeyName(LPCWSTR pszKeyName, CK_SLOT_ID* slotId, CK_B
static SECURITY_STATUS NCryptP11EnumKeys(NCRYPT_PROV_HANDLE hProvider, LPCWSTR pszScope, static SECURITY_STATUS NCryptP11EnumKeys(NCRYPT_PROV_HANDLE hProvider, LPCWSTR pszScope,
NCryptKeyName** ppKeyName, PVOID* ppEnumState, NCryptKeyName** ppKeyName, PVOID* ppEnumState,
DWORD dwFlags) WINPR_ATTR_UNUSED DWORD dwFlags)
{ {
NCryptP11ProviderHandle* provider = (NCryptP11ProviderHandle*)hProvider; NCryptP11ProviderHandle* provider = (NCryptP11ProviderHandle*)hProvider;
P11EnumKeysState* state = (P11EnumKeysState*)*ppEnumState; P11EnumKeysState* state = (P11EnumKeysState*)*ppEnumState;
@ -979,7 +979,8 @@ static SECURITY_STATUS check_for_piv_container_name(NCryptP11KeyHandle* key, BYT
static SECURITY_STATUS NCryptP11KeyGetProperties(NCryptP11KeyHandle* keyHandle, static SECURITY_STATUS NCryptP11KeyGetProperties(NCryptP11KeyHandle* keyHandle,
NCryptKeyGetPropertyEnum property, PBYTE pbOutput, NCryptKeyGetPropertyEnum property, PBYTE pbOutput,
DWORD cbOutput, DWORD* pcbResult, DWORD dwFlags) DWORD cbOutput, DWORD* pcbResult,
WINPR_ATTR_UNUSED DWORD dwFlags)
{ {
SECURITY_STATUS ret = NTE_FAIL; SECURITY_STATUS ret = NTE_FAIL;
CK_RV rv = 0; CK_RV rv = 0;
@ -1202,7 +1203,8 @@ static SECURITY_STATUS NCryptP11GetProperty(NCRYPT_HANDLE hObject, NCryptKeyGetP
} }
static SECURITY_STATUS NCryptP11OpenKey(NCRYPT_PROV_HANDLE hProvider, NCRYPT_KEY_HANDLE* phKey, static SECURITY_STATUS NCryptP11OpenKey(NCRYPT_PROV_HANDLE hProvider, NCRYPT_KEY_HANDLE* phKey,
LPCWSTR pszKeyName, DWORD dwLegacyKeySpec, DWORD dwFlags) LPCWSTR pszKeyName, WINPR_ATTR_UNUSED DWORD dwLegacyKeySpec,
WINPR_ATTR_UNUSED DWORD dwFlags)
{ {
SECURITY_STATUS ret = 0; SECURITY_STATUS ret = 0;
CK_SLOT_ID slotId = 0; CK_SLOT_ID slotId = 0;
@ -1272,8 +1274,8 @@ fail:
} }
SECURITY_STATUS NCryptOpenP11StorageProviderEx(NCRYPT_PROV_HANDLE* phProvider, SECURITY_STATUS NCryptOpenP11StorageProviderEx(NCRYPT_PROV_HANDLE* phProvider,
LPCWSTR pszProviderName, DWORD dwFlags, WINPR_ATTR_UNUSED LPCWSTR pszProviderName,
LPCSTR* modulePaths) WINPR_ATTR_UNUSED DWORD dwFlags, LPCSTR* modulePaths)
{ {
SECURITY_STATUS status = ERROR_INVALID_PARAMETER; SECURITY_STATUS status = ERROR_INVALID_PARAMETER;
LPCSTR defaultPaths[] = { "p11-kit-proxy.so", "opensc-pkcs11.so", NULL }; LPCSTR defaultPaths[] = { "p11-kit-proxy.so", "opensc-pkcs11.so", NULL };

View File

@ -27,8 +27,8 @@
#if DEFINE_UNICODE #if DEFINE_UNICODE
HRESULT PATH_ALLOC_COMBINE(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlags, HRESULT PATH_ALLOC_COMBINE(PCWSTR pszPathIn, PCWSTR pszMore,
PWSTR* ppszPathOut) WINPR_ATTR_UNUSED unsigned long dwFlags, PWSTR* ppszPathOut)
{ {
WLog_WARN("TODO", "has known bugs and needs fixing."); WLog_WARN("TODO", "has known bugs and needs fixing.");
@ -98,7 +98,8 @@ HRESULT PATH_ALLOC_COMBINE(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFla
#else #else
HRESULT PATH_ALLOC_COMBINE(PCSTR pszPathIn, PCSTR pszMore, unsigned long dwFlags, PSTR* ppszPathOut) HRESULT PATH_ALLOC_COMBINE(PCSTR pszPathIn, PCSTR pszMore, WINPR_ATTR_UNUSED unsigned long dwFlags,
PSTR* ppszPathOut)
{ {
WLog_WARN("TODO", "has known bugs and needs fixing."); WLog_WARN("TODO", "has known bugs and needs fixing.");

View File

@ -9,8 +9,8 @@
#if DEFINE_UNICODE #if DEFINE_UNICODE
HRESULT PATH_CCH_ADD_SEPARATOR_EX(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd, HRESULT PATH_CCH_ADD_SEPARATOR_EX(PWSTR pszPath, size_t cchPath, WINPR_ATTR_UNUSED PWSTR* ppszEnd,
size_t* pcchRemaining) WINPR_ATTR_UNUSED size_t* pcchRemaining)
{ {
size_t pszPathLength; size_t pszPathLength;
@ -35,8 +35,9 @@ HRESULT PATH_CCH_ADD_SEPARATOR_EX(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd,
#else #else
HRESULT PATH_CCH_ADD_SEPARATOR_EX(PSTR pszPath, size_t cchPath, PSTR* ppszEnd, HRESULT PATH_CCH_ADD_SEPARATOR_EX(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath,
size_t* pcchRemaining) WINPR_ATTR_UNUSED PSTR* ppszEnd,
WINPR_ATTR_UNUSED size_t* pcchRemaining)
{ {
size_t pszPathLength; size_t pszPathLength;

View File

@ -136,13 +136,13 @@
* PathCchRemoveBackslash * PathCchRemoveBackslash
*/ */
HRESULT PathCchRemoveBackslashA(PSTR pszPath, size_t cchPath) HRESULT PathCchRemoveBackslashA(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchRemoveBackslashW(PWSTR pszPath, size_t cchPath) HRESULT PathCchRemoveBackslashW(WINPR_ATTR_UNUSED PWSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -206,15 +206,17 @@ HRESULT PathCchRemoveBackslashW(PWSTR pszPath, size_t cchPath)
#undef CUR_PATH_SEPARATOR_CHR #undef CUR_PATH_SEPARATOR_CHR
#undef PATH_CCH_ADD_SEPARATOR_EX #undef PATH_CCH_ADD_SEPARATOR_EX
HRESULT PathCchRemoveBackslashExA(PSTR pszPath, size_t cchPath, PSTR* ppszEnd, HRESULT PathCchRemoveBackslashExA(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath,
size_t* pcchRemaining) WINPR_ATTR_UNUSED PSTR* ppszEnd,
WINPR_ATTR_UNUSED size_t* pcchRemaining)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchRemoveBackslashExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd, HRESULT PathCchRemoveBackslashExW(WINPR_ATTR_UNUSED PWSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath,
size_t* pcchRemaining) WINPR_ATTR_UNUSED PWSTR* ppszEnd,
WINPR_ATTR_UNUSED size_t* pcchRemaining)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -352,13 +354,15 @@ HRESULT PathCchRemoveBackslashExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd,
* PathCchAppendEx * PathCchAppendEx
*/ */
HRESULT PathCchAppendExA(PSTR pszPath, size_t cchPath, PCSTR pszMore, unsigned long dwFlags) HRESULT PathCchAppendExA(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath,
WINPR_ATTR_UNUSED PCSTR pszMore, WINPR_ATTR_UNUSED unsigned long dwFlags)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchAppendExW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore, unsigned long dwFlags) HRESULT PathCchAppendExW(WINPR_ATTR_UNUSED PWSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath,
WINPR_ATTR_UNUSED PCWSTR pszMore, WINPR_ATTR_UNUSED unsigned long dwFlags)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -368,13 +372,16 @@ HRESULT PathCchAppendExW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore, unsigned
* PathCchCanonicalize * PathCchCanonicalize
*/ */
HRESULT PathCchCanonicalizeA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn) HRESULT PathCchCanonicalizeA(WINPR_ATTR_UNUSED PSTR pszPathOut, WINPR_ATTR_UNUSED size_t cchPathOut,
WINPR_ATTR_UNUSED PCSTR pszPathIn)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchCanonicalizeW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn) HRESULT PathCchCanonicalizeW(WINPR_ATTR_UNUSED PWSTR pszPathOut,
WINPR_ATTR_UNUSED size_t cchPathOut,
WINPR_ATTR_UNUSED PCWSTR pszPathIn)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -384,15 +391,19 @@ HRESULT PathCchCanonicalizeW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPath
* PathCchCanonicalizeEx * PathCchCanonicalizeEx
*/ */
HRESULT PathCchCanonicalizeExA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn, HRESULT PathCchCanonicalizeExA(WINPR_ATTR_UNUSED PSTR pszPathOut,
unsigned long dwFlags) WINPR_ATTR_UNUSED size_t cchPathOut,
WINPR_ATTR_UNUSED PCSTR pszPathIn,
WINPR_ATTR_UNUSED unsigned long dwFlags)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchCanonicalizeExW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, HRESULT PathCchCanonicalizeExW(WINPR_ATTR_UNUSED PWSTR pszPathOut,
unsigned long dwFlags) WINPR_ATTR_UNUSED size_t cchPathOut,
WINPR_ATTR_UNUSED PCWSTR pszPathIn,
WINPR_ATTR_UNUSED unsigned long dwFlags)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -402,13 +413,17 @@ HRESULT PathCchCanonicalizeExW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPa
* PathAllocCanonicalize * PathAllocCanonicalize
*/ */
HRESULT PathAllocCanonicalizeA(PCSTR pszPathIn, unsigned long dwFlags, PSTR* ppszPathOut) HRESULT PathAllocCanonicalizeA(WINPR_ATTR_UNUSED PCSTR pszPathIn,
WINPR_ATTR_UNUSED unsigned long dwFlags,
WINPR_ATTR_UNUSED PSTR* ppszPathOut)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathAllocCanonicalizeW(PCWSTR pszPathIn, unsigned long dwFlags, PWSTR* ppszPathOut) HRESULT PathAllocCanonicalizeW(WINPR_ATTR_UNUSED PCWSTR pszPathIn,
WINPR_ATTR_UNUSED unsigned long dwFlags,
WINPR_ATTR_UNUSED PWSTR* ppszPathOut)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -418,13 +433,15 @@ HRESULT PathAllocCanonicalizeW(PCWSTR pszPathIn, unsigned long dwFlags, PWSTR* p
* PathCchCombine * PathCchCombine
*/ */
HRESULT PathCchCombineA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn, PCSTR pszMore) HRESULT PathCchCombineA(WINPR_ATTR_UNUSED PSTR pszPathOut, WINPR_ATTR_UNUSED size_t cchPathOut,
WINPR_ATTR_UNUSED PCSTR pszPathIn, WINPR_ATTR_UNUSED PCSTR pszMore)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchCombineW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, PCWSTR pszMore) HRESULT PathCchCombineW(WINPR_ATTR_UNUSED PWSTR pszPathOut, WINPR_ATTR_UNUSED size_t cchPathOut,
WINPR_ATTR_UNUSED PCWSTR pszPathIn, WINPR_ATTR_UNUSED PCWSTR pszMore)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -434,15 +451,17 @@ HRESULT PathCchCombineW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, P
* PathCchCombineEx * PathCchCombineEx
*/ */
HRESULT PathCchCombineExA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn, PCSTR pszMore, HRESULT PathCchCombineExA(WINPR_ATTR_UNUSED PSTR pszPathOut, WINPR_ATTR_UNUSED size_t cchPathOut,
unsigned long dwFlags) WINPR_ATTR_UNUSED PCSTR pszPathIn, WINPR_ATTR_UNUSED PCSTR pszMore,
WINPR_ATTR_UNUSED unsigned long dwFlags)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchCombineExW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, PCWSTR pszMore, HRESULT PathCchCombineExW(WINPR_ATTR_UNUSED PWSTR pszPathOut, WINPR_ATTR_UNUSED size_t cchPathOut,
unsigned long dwFlags) WINPR_ATTR_UNUSED PCWSTR pszPathIn, WINPR_ATTR_UNUSED PCWSTR pszMore,
WINPR_ATTR_UNUSED unsigned long dwFlags)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -564,7 +583,8 @@ HRESULT PathCchFindExtensionA(PCSTR pszPath, size_t cchPath, PCSTR* ppszExt)
return S_OK; return S_OK;
} }
HRESULT PathCchFindExtensionW(PCWSTR pszPath, size_t cchPath, PCWSTR* ppszExt) HRESULT PathCchFindExtensionW(WINPR_ATTR_UNUSED PCWSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath,
WINPR_ATTR_UNUSED PCWSTR* ppszExt)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -574,13 +594,15 @@ HRESULT PathCchFindExtensionW(PCWSTR pszPath, size_t cchPath, PCWSTR* ppszExt)
* PathCchRenameExtension * PathCchRenameExtension
*/ */
HRESULT PathCchRenameExtensionA(PSTR pszPath, size_t cchPath, PCSTR pszExt) HRESULT PathCchRenameExtensionA(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath,
WINPR_ATTR_UNUSED PCSTR pszExt)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchRenameExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt) HRESULT PathCchRenameExtensionW(WINPR_ATTR_UNUSED PWSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath,
WINPR_ATTR_UNUSED PCWSTR pszExt)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -590,13 +612,13 @@ HRESULT PathCchRenameExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt)
* PathCchRemoveExtension * PathCchRemoveExtension
*/ */
HRESULT PathCchRemoveExtensionA(PSTR pszPath, size_t cchPath) HRESULT PathCchRemoveExtensionA(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchRemoveExtensionW(PWSTR pszPath, size_t cchPath) HRESULT PathCchRemoveExtensionW(WINPR_ATTR_UNUSED PWSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -606,13 +628,13 @@ HRESULT PathCchRemoveExtensionW(PWSTR pszPath, size_t cchPath)
* PathCchIsRoot * PathCchIsRoot
*/ */
BOOL PathCchIsRootA(PCSTR pszPath) BOOL PathCchIsRootA(WINPR_ATTR_UNUSED PCSTR pszPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return FALSE; return FALSE;
} }
BOOL PathCchIsRootW(PCWSTR pszPath) BOOL PathCchIsRootW(WINPR_ATTR_UNUSED PCWSTR pszPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return FALSE; return FALSE;
@ -654,13 +676,13 @@ BOOL PathIsUNCExW(PCWSTR pszPath, PCWSTR* ppszServer)
* PathCchSkipRoot * PathCchSkipRoot
*/ */
HRESULT PathCchSkipRootA(PCSTR pszPath, PCSTR* ppszRootEnd) HRESULT PathCchSkipRootA(WINPR_ATTR_UNUSED PCSTR pszPath, WINPR_ATTR_UNUSED PCSTR* ppszRootEnd)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchSkipRootW(PCWSTR pszPath, PCWSTR* ppszRootEnd) HRESULT PathCchSkipRootW(WINPR_ATTR_UNUSED PCWSTR pszPath, WINPR_ATTR_UNUSED PCWSTR* ppszRootEnd)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -670,13 +692,13 @@ HRESULT PathCchSkipRootW(PCWSTR pszPath, PCWSTR* ppszRootEnd)
* PathCchStripToRoot * PathCchStripToRoot
*/ */
HRESULT PathCchStripToRootA(PSTR pszPath, size_t cchPath) HRESULT PathCchStripToRootA(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchStripToRootW(PWSTR pszPath, size_t cchPath) HRESULT PathCchStripToRootW(WINPR_ATTR_UNUSED PWSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
@ -764,13 +786,13 @@ HRESULT PathCchStripPrefixW(PWSTR pszPath, size_t cchPath)
* PathCchRemoveFileSpec * PathCchRemoveFileSpec
*/ */
HRESULT PathCchRemoveFileSpecA(PSTR pszPath, size_t cchPath) HRESULT PathCchRemoveFileSpecA(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT PathCchRemoveFileSpecW(PWSTR pszPath, size_t cchPath) HRESULT PathCchRemoveFileSpecW(WINPR_ATTR_UNUSED PWSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return E_NOTIMPL; return E_NOTIMPL;

View File

@ -497,7 +497,7 @@ fail:
return NULL; return NULL;
} }
BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes) BOOL PathMakePathA(LPCSTR path, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpAttributes)
{ {
#if defined(_UWP) #if defined(_UWP)
return FALSE; return FALSE;
@ -550,7 +550,7 @@ BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes)
#endif #endif
} }
BOOL PathMakePathW(LPCWSTR path, LPSECURITY_ATTRIBUTES lpAttributes) BOOL PathMakePathW(LPCWSTR path, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpAttributes)
{ {
#if defined(_UWP) #if defined(_UWP)
return FALSE; return FALSE;

View File

@ -728,9 +728,12 @@ out:
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
HANDLE CreateNamedPipeW(LPCWSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, HANDLE CreateNamedPipeW(WINPR_ATTR_UNUSED LPCWSTR lpName, WINPR_ATTR_UNUSED DWORD dwOpenMode,
DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, WINPR_ATTR_UNUSED DWORD dwPipeMode, WINPR_ATTR_UNUSED DWORD nMaxInstances,
LPSECURITY_ATTRIBUTES lpSecurityAttributes) WINPR_ATTR_UNUSED DWORD nOutBufferSize,
WINPR_ATTR_UNUSED DWORD nInBufferSize,
WINPR_ATTR_UNUSED DWORD nDefaultTimeOut,
WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{ {
WLog_ERR(TAG, "is not implemented"); WLog_ERR(TAG, "is not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -803,17 +806,21 @@ BOOL DisconnectNamedPipe(HANDLE hNamedPipe)
return TRUE; return TRUE;
} }
BOOL PeekNamedPipe(HANDLE hNamedPipe, LPVOID lpBuffer, DWORD nBufferSize, LPDWORD lpBytesRead, BOOL PeekNamedPipe(WINPR_ATTR_UNUSED HANDLE hNamedPipe, WINPR_ATTR_UNUSED LPVOID lpBuffer,
LPDWORD lpTotalBytesAvail, LPDWORD lpBytesLeftThisMessage) WINPR_ATTR_UNUSED DWORD nBufferSize, WINPR_ATTR_UNUSED LPDWORD lpBytesRead,
WINPR_ATTR_UNUSED LPDWORD lpTotalBytesAvail,
WINPR_ATTR_UNUSED LPDWORD lpBytesLeftThisMessage)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
BOOL TransactNamedPipe(HANDLE hNamedPipe, LPVOID lpInBuffer, DWORD nInBufferSize, BOOL TransactNamedPipe(WINPR_ATTR_UNUSED HANDLE hNamedPipe, WINPR_ATTR_UNUSED LPVOID lpInBuffer,
LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesRead, WINPR_ATTR_UNUSED DWORD nInBufferSize, WINPR_ATTR_UNUSED LPVOID lpOutBuffer,
LPOVERLAPPED lpOverlapped) WINPR_ATTR_UNUSED DWORD nOutBufferSize,
WINPR_ATTR_UNUSED LPDWORD lpBytesRead,
WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -858,7 +865,7 @@ BOOL WaitNamedPipeA(LPCSTR lpNamedPipeName, DWORD nTimeOut)
return status; return status;
} }
BOOL WaitNamedPipeW(LPCWSTR lpNamedPipeName, DWORD nTimeOut) BOOL WaitNamedPipeW(WINPR_ATTR_UNUSED LPCWSTR lpNamedPipeName, WINPR_ATTR_UNUSED DWORD nTimeOut)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -908,23 +915,25 @@ BOOL SetNamedPipeHandleState(HANDLE hNamedPipe, LPDWORD lpMode, LPDWORD lpMaxCol
return TRUE; return TRUE;
} }
BOOL ImpersonateNamedPipeClient(HANDLE hNamedPipe) BOOL ImpersonateNamedPipeClient(WINPR_ATTR_UNUSED HANDLE hNamedPipe)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
BOOL GetNamedPipeClientComputerNameA(HANDLE Pipe, LPCSTR ClientComputerName, BOOL GetNamedPipeClientComputerNameA(WINPR_ATTR_UNUSED HANDLE Pipe,
ULONG ClientComputerNameLength) WINPR_ATTR_UNUSED LPCSTR ClientComputerName,
WINPR_ATTR_UNUSED ULONG ClientComputerNameLength)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
BOOL GetNamedPipeClientComputerNameW(HANDLE Pipe, LPCWSTR ClientComputerName, BOOL GetNamedPipeClientComputerNameW(WINPR_ATTR_UNUSED HANDLE Pipe,
ULONG ClientComputerNameLength) WINPR_ATTR_UNUSED LPCWSTR ClientComputerName,
WINPR_ATTR_UNUSED ULONG ClientComputerNameLength)
{ {
WLog_ERR(TAG, "Not implemented"); WLog_ERR(TAG, "Not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View File

@ -21,6 +21,7 @@
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/pool.h> #include <winpr/pool.h>
#include <winpr/wlog.h>
#include <winpr/library.h> #include <winpr/library.h>
#ifdef WINPR_THREAD_POOL #ifdef WINPR_THREAD_POOL
@ -40,13 +41,14 @@ static BOOL CALLBACK init_module(PINIT_ONCE once, PVOID param, PVOID* context)
} }
#endif #endif
BOOL winpr_CallbackMayRunLong(PTP_CALLBACK_INSTANCE pci) BOOL winpr_CallbackMayRunLong(WINPR_ATTR_UNUSED PTP_CALLBACK_INSTANCE pci)
{ {
#ifdef _WIN32 #ifdef _WIN32
InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);
if (pCallbackMayRunLong) if (pCallbackMayRunLong)
return pCallbackMayRunLong(pci); return pCallbackMayRunLong(pci);
#endif #endif
WLog_ERR("TODO", "TODO: implement");
/* No default implementation */ /* No default implementation */
return FALSE; return FALSE;
} }

View File

@ -60,7 +60,8 @@ static BOOL CALLBACK init_module(PINIT_ONCE once, PVOID param, PVOID* context)
} }
#endif #endif
VOID SetEventWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE evt) VOID SetEventWhenCallbackReturns(WINPR_ATTR_UNUSED PTP_CALLBACK_INSTANCE pci,
WINPR_ATTR_UNUSED HANDLE evt)
{ {
#ifdef _WIN32 #ifdef _WIN32
InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);
@ -70,10 +71,12 @@ VOID SetEventWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE evt)
return; return;
} }
#endif #endif
WLog_ERR("TODO", "TODO: implement");
/* No default implementation */ /* No default implementation */
} }
VOID ReleaseSemaphoreWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE sem, DWORD crel) VOID ReleaseSemaphoreWhenCallbackReturns(WINPR_ATTR_UNUSED PTP_CALLBACK_INSTANCE pci,
WINPR_ATTR_UNUSED HANDLE sem, WINPR_ATTR_UNUSED DWORD crel)
{ {
#ifdef _WIN32 #ifdef _WIN32
InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);
@ -84,9 +87,11 @@ VOID ReleaseSemaphoreWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE sem,
} }
#endif #endif
/* No default implementation */ /* No default implementation */
WLog_ERR("TODO", "TODO: implement");
} }
VOID ReleaseMutexWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE mut) VOID ReleaseMutexWhenCallbackReturns(WINPR_ATTR_UNUSED PTP_CALLBACK_INSTANCE pci,
WINPR_ATTR_UNUSED HANDLE mut)
{ {
#ifdef _WIN32 #ifdef _WIN32
InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);
@ -97,9 +102,11 @@ VOID ReleaseMutexWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE mut)
} }
#endif #endif
/* No default implementation */ /* No default implementation */
WLog_ERR("TODO", "TODO: implement");
} }
VOID LeaveCriticalSectionWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, PCRITICAL_SECTION pcs) VOID LeaveCriticalSectionWhenCallbackReturns(WINPR_ATTR_UNUSED PTP_CALLBACK_INSTANCE pci,
WINPR_ATTR_UNUSED PCRITICAL_SECTION pcs)
{ {
#ifdef _WIN32 #ifdef _WIN32
InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);
@ -109,9 +116,11 @@ VOID LeaveCriticalSectionWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, PCRITICA
} }
#endif #endif
/* No default implementation */ /* No default implementation */
WLog_ERR("TODO", "TODO: implement");
} }
VOID FreeLibraryWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HMODULE mod) VOID FreeLibraryWhenCallbackReturns(WINPR_ATTR_UNUSED PTP_CALLBACK_INSTANCE pci,
WINPR_ATTR_UNUSED HMODULE mod)
{ {
#ifdef _WIN32 #ifdef _WIN32
InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);
@ -122,9 +131,10 @@ VOID FreeLibraryWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HMODULE mod)
} }
#endif #endif
/* No default implementation */ /* No default implementation */
WLog_ERR("TODO", "TODO: implement");
} }
VOID DisassociateCurrentThreadFromCallback(PTP_CALLBACK_INSTANCE pci) VOID DisassociateCurrentThreadFromCallback(WINPR_ATTR_UNUSED PTP_CALLBACK_INSTANCE pci)
{ {
#ifdef _WIN32 #ifdef _WIN32
InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);
@ -134,6 +144,7 @@ VOID DisassociateCurrentThreadFromCallback(PTP_CALLBACK_INSTANCE pci)
return; return;
} }
#endif #endif
WLog_ERR("TODO", "TODO: implement");
/* No default implementation */ /* No default implementation */
} }

View File

@ -92,8 +92,9 @@ VOID winpr_SetThreadpoolCallbackCleanupGroup(PTP_CALLBACK_ENVIRON pcbe, PTP_CLEA
#endif #endif
} }
VOID winpr_CloseThreadpoolCleanupGroupMembers(PTP_CLEANUP_GROUP ptpcg, BOOL fCancelPendingCallbacks, VOID winpr_CloseThreadpoolCleanupGroupMembers(WINPR_ATTR_UNUSED PTP_CLEANUP_GROUP ptpcg,
PVOID pvCleanupContext) WINPR_ATTR_UNUSED BOOL fCancelPendingCallbacks,
WINPR_ATTR_UNUSED PVOID pvCleanupContext)
{ {
#ifdef _WIN32 #ifdef _WIN32
InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);

View File

@ -21,29 +21,38 @@
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/pool.h> #include <winpr/pool.h>
#include <winpr/wlog.h>
#ifdef WINPR_THREAD_POOL #ifdef WINPR_THREAD_POOL
PTP_IO winpr_CreateThreadpoolIo(HANDLE fl, PTP_WIN32_IO_CALLBACK pfnio, PVOID pv, PTP_IO winpr_CreateThreadpoolIo(WINPR_ATTR_UNUSED HANDLE fl,
PTP_CALLBACK_ENVIRON pcbe) WINPR_ATTR_UNUSED PTP_WIN32_IO_CALLBACK pfnio,
WINPR_ATTR_UNUSED PVOID pv,
WINPR_ATTR_UNUSED PTP_CALLBACK_ENVIRON pcbe)
{ {
WLog_ERR("TODO", "TODO: Implement");
return NULL; return NULL;
} }
VOID winpr_CloseThreadpoolIo(PTP_IO pio) VOID winpr_CloseThreadpoolIo(WINPR_ATTR_UNUSED PTP_IO pio)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
VOID winpr_StartThreadpoolIo(PTP_IO pio) VOID winpr_StartThreadpoolIo(WINPR_ATTR_UNUSED PTP_IO pio)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
VOID winpr_CancelThreadpoolIo(PTP_IO pio) VOID winpr_CancelThreadpoolIo(WINPR_ATTR_UNUSED PTP_IO pio)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
VOID winpr_WaitForThreadpoolIoCallbacks(PTP_IO pio, BOOL fCancelPendingCallbacks) VOID winpr_WaitForThreadpoolIoCallbacks(WINPR_ATTR_UNUSED PTP_IO pio,
WINPR_ATTR_UNUSED BOOL fCancelPendingCallbacks)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
#endif #endif

View File

@ -21,24 +21,33 @@
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/pool.h> #include <winpr/pool.h>
#include <winpr/wlog.h>
#ifdef WINPR_THREAD_POOL #ifdef WINPR_THREAD_POOL
PTP_WAIT winpr_CreateThreadpoolWait(PTP_WAIT_CALLBACK pfnwa, PVOID pv, PTP_CALLBACK_ENVIRON pcbe) PTP_WAIT winpr_CreateThreadpoolWait(WINPR_ATTR_UNUSED PTP_WAIT_CALLBACK pfnwa,
WINPR_ATTR_UNUSED PVOID pv,
WINPR_ATTR_UNUSED PTP_CALLBACK_ENVIRON pcbe)
{ {
WLog_ERR("TODO", "TODO: Implement");
return NULL; return NULL;
} }
VOID winpr_CloseThreadpoolWait(PTP_WAIT pwa) VOID winpr_CloseThreadpoolWait(WINPR_ATTR_UNUSED PTP_WAIT pwa)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
VOID winpr_SetThreadpoolWait(PTP_WAIT pwa, HANDLE h, PFILETIME pftTimeout) VOID winpr_SetThreadpoolWait(WINPR_ATTR_UNUSED PTP_WAIT pwa, WINPR_ATTR_UNUSED HANDLE h,
WINPR_ATTR_UNUSED PFILETIME pftTimeout)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
VOID winpr_WaitForThreadpoolWaitCallbacks(PTP_WAIT pwa, BOOL fCancelPendingCallbacks) VOID winpr_WaitForThreadpoolWaitCallbacks(WINPR_ATTR_UNUSED PTP_WAIT pwa,
WINPR_ATTR_UNUSED BOOL fCancelPendingCallbacks)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
#endif #endif

View File

@ -21,30 +21,41 @@
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/pool.h> #include <winpr/pool.h>
#include <winpr/wlog.h>
#ifdef WINPR_THREAD_POOL #ifdef WINPR_THREAD_POOL
PTP_TIMER winpr_CreateThreadpoolTimer(PTP_TIMER_CALLBACK pfnti, PVOID pv, PTP_CALLBACK_ENVIRON pcbe) PTP_TIMER winpr_CreateThreadpoolTimer(WINPR_ATTR_UNUSED PTP_TIMER_CALLBACK pfnti,
WINPR_ATTR_UNUSED PVOID pv,
WINPR_ATTR_UNUSED PTP_CALLBACK_ENVIRON pcbe)
{ {
WLog_ERR("TODO", "TODO: Implement");
return NULL; return NULL;
} }
VOID winpr_CloseThreadpoolTimer(PTP_TIMER pti) VOID winpr_CloseThreadpoolTimer(WINPR_ATTR_UNUSED PTP_TIMER pti)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
BOOL winpr_IsThreadpoolTimerSet(PTP_TIMER pti) BOOL winpr_IsThreadpoolTimerSet(WINPR_ATTR_UNUSED PTP_TIMER pti)
{ {
WLog_ERR("TODO", "TODO: Implement");
return FALSE; return FALSE;
} }
VOID winpr_SetThreadpoolTimer(PTP_TIMER pti, PFILETIME pftDueTime, DWORD msPeriod, VOID winpr_SetThreadpoolTimer(WINPR_ATTR_UNUSED PTP_TIMER pti,
DWORD msWindowLength) WINPR_ATTR_UNUSED PFILETIME pftDueTime,
WINPR_ATTR_UNUSED DWORD msPeriod,
WINPR_ATTR_UNUSED DWORD msWindowLength)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
VOID winpr_WaitForThreadpoolTimerCallbacks(PTP_TIMER pti, BOOL fCancelPendingCallbacks) VOID winpr_WaitForThreadpoolTimerCallbacks(WINPR_ATTR_UNUSED PTP_TIMER pti,
WINPR_ATTR_UNUSED BOOL fCancelPendingCallbacks)
{ {
WLog_ERR("TODO", "TODO: Implement");
} }
#endif #endif

View File

@ -155,8 +155,9 @@ VOID winpr_SubmitThreadpoolWork(PTP_WORK pwk)
// NOLINTNEXTLINE(clang-analyzer-unix.Malloc): Queue_Enqueue takes ownership of callbackInstance // NOLINTNEXTLINE(clang-analyzer-unix.Malloc): Queue_Enqueue takes ownership of callbackInstance
} }
BOOL winpr_TrySubmitThreadpoolCallback(PTP_SIMPLE_CALLBACK pfns, PVOID pv, BOOL winpr_TrySubmitThreadpoolCallback(WINPR_ATTR_UNUSED PTP_SIMPLE_CALLBACK pfns,
PTP_CALLBACK_ENVIRON pcbe) WINPR_ATTR_UNUSED PVOID pv,
WINPR_ATTR_UNUSED PTP_CALLBACK_ENVIRON pcbe)
{ {
#ifdef _WIN32 #ifdef _WIN32
InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);
@ -169,7 +170,8 @@ BOOL winpr_TrySubmitThreadpoolCallback(PTP_SIMPLE_CALLBACK pfns, PVOID pv,
return FALSE; return FALSE;
} }
VOID winpr_WaitForThreadpoolWorkCallbacks(PTP_WORK pwk, BOOL fCancelPendingCallbacks) VOID winpr_WaitForThreadpoolWorkCallbacks(PTP_WORK pwk,
WINPR_ATTR_UNUSED BOOL fCancelPendingCallbacks)
{ {
HANDLE event = NULL; HANDLE event = NULL;
PTP_POOL pool = NULL; PTP_POOL pool = NULL;

View File

@ -57,65 +57,73 @@ LONG RegCloseKey(HKEY hKey)
return 0; return 0;
} }
LONG RegCopyTreeW(HKEY hKeySrc, LPCWSTR lpSubKey, HKEY hKeyDest) LONG RegCopyTreeW(WINPR_ATTR_UNUSED HKEY hKeySrc, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
WINPR_ATTR_UNUSED HKEY hKeyDest)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegCopyTreeA(HKEY hKeySrc, LPCSTR lpSubKey, HKEY hKeyDest) LONG RegCopyTreeA(WINPR_ATTR_UNUSED HKEY hKeySrc, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
WINPR_ATTR_UNUSED HKEY hKeyDest)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegCreateKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass, DWORD dwOptions, LONG RegCreateKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED LPWSTR lpClass,
LPDWORD lpdwDisposition) WINPR_ATTR_UNUSED DWORD dwOptions, WINPR_ATTR_UNUSED REGSAM samDesired,
WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes,
WINPR_ATTR_UNUSED PHKEY phkResult, WINPR_ATTR_UNUSED LPDWORD lpdwDisposition)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegCreateKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD Reserved, LPSTR lpClass, DWORD dwOptions, LONG RegCreateKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED LPSTR lpClass,
LPDWORD lpdwDisposition) WINPR_ATTR_UNUSED DWORD dwOptions, WINPR_ATTR_UNUSED REGSAM samDesired,
WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes,
WINPR_ATTR_UNUSED PHKEY phkResult, WINPR_ATTR_UNUSED LPDWORD lpdwDisposition)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegDeleteKeyExW(HKEY hKey, LPCWSTR lpSubKey, REGSAM samDesired, DWORD Reserved) LONG RegDeleteKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD Reserved)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegDeleteKeyExA(HKEY hKey, LPCSTR lpSubKey, REGSAM samDesired, DWORD Reserved) LONG RegDeleteKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD Reserved)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegDeleteTreeW(HKEY hKey, LPCWSTR lpSubKey) LONG RegDeleteTreeW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegDeleteTreeA(HKEY hKey, LPCSTR lpSubKey) LONG RegDeleteTreeA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName) LONG RegDeleteValueW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpValueName)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegDeleteValueA(HKEY hKey, LPCSTR lpValueName) LONG RegDeleteValueA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpValueName)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
@ -127,109 +135,134 @@ LONG RegDisablePredefinedCacheEx(void)
return -1; return -1;
} }
LONG RegEnumKeyExW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, LPDWORD lpcName, LPDWORD lpReserved, LONG RegEnumKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex,
LPWSTR lpClass, LPDWORD lpcClass, PFILETIME lpftLastWriteTime) WINPR_ATTR_UNUSED LPWSTR lpName, WINPR_ATTR_UNUSED LPDWORD lpcName,
WINPR_ATTR_UNUSED LPDWORD lpReserved, WINPR_ATTR_UNUSED LPWSTR lpClass,
WINPR_ATTR_UNUSED LPDWORD lpcClass,
WINPR_ATTR_UNUSED PFILETIME lpftLastWriteTime)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpName, LPDWORD lpcName, LPDWORD lpReserved, LONG RegEnumKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex,
LPSTR lpClass, LPDWORD lpcClass, PFILETIME lpftLastWriteTime) WINPR_ATTR_UNUSED LPSTR lpName, WINPR_ATTR_UNUSED LPDWORD lpcName,
WINPR_ATTR_UNUSED LPDWORD lpReserved, WINPR_ATTR_UNUSED LPSTR lpClass,
WINPR_ATTR_UNUSED LPDWORD lpcClass,
WINPR_ATTR_UNUSED PFILETIME lpftLastWriteTime)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegEnumValueW(HKEY hKey, DWORD dwIndex, LPWSTR lpValueName, LPDWORD lpcchValueName, LONG RegEnumValueW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex,
LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) WINPR_ATTR_UNUSED LPWSTR lpValueName, WINPR_ATTR_UNUSED LPDWORD lpcchValueName,
WINPR_ATTR_UNUSED LPDWORD lpReserved, WINPR_ATTR_UNUSED LPDWORD lpType,
WINPR_ATTR_UNUSED LPBYTE lpData, WINPR_ATTR_UNUSED LPDWORD lpcbData)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegEnumValueA(HKEY hKey, DWORD dwIndex, LPSTR lpValueName, LPDWORD lpcchValueName, LONG RegEnumValueA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex,
LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) WINPR_ATTR_UNUSED LPSTR lpValueName, WINPR_ATTR_UNUSED LPDWORD lpcchValueName,
WINPR_ATTR_UNUSED LPDWORD lpReserved, WINPR_ATTR_UNUSED LPDWORD lpType,
WINPR_ATTR_UNUSED LPBYTE lpData, WINPR_ATTR_UNUSED LPDWORD lpcbData)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegFlushKey(HKEY hKey) LONG RegFlushKey(WINPR_ATTR_UNUSED HKEY hKey)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegGetKeySecurity(HKEY hKey, SECURITY_INFORMATION SecurityInformation, LONG RegGetKeySecurity(WINPR_ATTR_UNUSED HKEY hKey,
PSECURITY_DESCRIPTOR pSecurityDescriptor, LPDWORD lpcbSecurityDescriptor) WINPR_ATTR_UNUSED SECURITY_INFORMATION SecurityInformation,
WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
WINPR_ATTR_UNUSED LPDWORD lpcbSecurityDescriptor)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegGetValueW(HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpValue, DWORD dwFlags, LPDWORD pdwType, LONG RegGetValueW(WINPR_ATTR_UNUSED HKEY hkey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
PVOID pvData, LPDWORD pcbData) WINPR_ATTR_UNUSED LPCWSTR lpValue, WINPR_ATTR_UNUSED DWORD dwFlags,
WINPR_ATTR_UNUSED LPDWORD pdwType, WINPR_ATTR_UNUSED PVOID pvData,
WINPR_ATTR_UNUSED LPDWORD pcbData)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegGetValueA(HKEY hkey, LPCSTR lpSubKey, LPCSTR lpValue, DWORD dwFlags, LPDWORD pdwType, LONG RegGetValueA(WINPR_ATTR_UNUSED HKEY hkey, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
PVOID pvData, LPDWORD pcbData) WINPR_ATTR_UNUSED LPCSTR lpValue, WINPR_ATTR_UNUSED DWORD dwFlags,
WINPR_ATTR_UNUSED LPDWORD pdwType, WINPR_ATTR_UNUSED PVOID pvData,
WINPR_ATTR_UNUSED LPDWORD pcbData)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegLoadAppKeyW(LPCWSTR lpFile, PHKEY phkResult, REGSAM samDesired, DWORD dwOptions, LONG RegLoadAppKeyW(WINPR_ATTR_UNUSED LPCWSTR lpFile, WINPR_ATTR_UNUSED PHKEY phkResult,
DWORD Reserved) WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD dwOptions,
WINPR_ATTR_UNUSED DWORD Reserved)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegLoadAppKeyA(LPCSTR lpFile, PHKEY phkResult, REGSAM samDesired, DWORD dwOptions, LONG RegLoadAppKeyA(WINPR_ATTR_UNUSED LPCSTR lpFile, WINPR_ATTR_UNUSED PHKEY phkResult,
DWORD Reserved) WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD dwOptions,
WINPR_ATTR_UNUSED DWORD Reserved)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegLoadKeyW(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpFile) LONG RegLoadKeyW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey,
WINPR_ATTR_UNUSED LPCWSTR lpFile)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegLoadKeyA(HKEY hKey, LPCSTR lpSubKey, LPCSTR lpFile) LONG RegLoadKeyA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey,
WINPR_ATTR_UNUSED LPCSTR lpFile)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegLoadMUIStringW(HKEY hKey, LPCWSTR pszValue, LPWSTR pszOutBuf, DWORD cbOutBuf, LONG RegLoadMUIStringW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR pszValue,
LPDWORD pcbData, DWORD Flags, LPCWSTR pszDirectory) WINPR_ATTR_UNUSED LPWSTR pszOutBuf, WINPR_ATTR_UNUSED DWORD cbOutBuf,
WINPR_ATTR_UNUSED LPDWORD pcbData, WINPR_ATTR_UNUSED DWORD Flags,
WINPR_ATTR_UNUSED LPCWSTR pszDirectory)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegLoadMUIStringA(HKEY hKey, LPCSTR pszValue, LPSTR pszOutBuf, DWORD cbOutBuf, LPDWORD pcbData, LONG RegLoadMUIStringA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR pszValue,
DWORD Flags, LPCSTR pszDirectory) WINPR_ATTR_UNUSED LPSTR pszOutBuf, WINPR_ATTR_UNUSED DWORD cbOutBuf,
WINPR_ATTR_UNUSED LPDWORD pcbData, WINPR_ATTR_UNUSED DWORD Flags,
WINPR_ATTR_UNUSED LPCSTR pszDirectory)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegNotifyChangeKeyValue(HKEY hKey, BOOL bWatchSubtree, DWORD dwNotifyFilter, HANDLE hEvent, LONG RegNotifyChangeKeyValue(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED BOOL bWatchSubtree,
BOOL fAsynchronous) WINPR_ATTR_UNUSED DWORD dwNotifyFilter,
WINPR_ATTR_UNUSED HANDLE hEvent, WINPR_ATTR_UNUSED BOOL fAsynchronous)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegOpenCurrentUser(REGSAM samDesired, PHKEY phkResult) LONG RegOpenCurrentUser(WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED PHKEY phkResult)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
@ -247,7 +280,8 @@ LONG RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesir
return rc; return rc;
} }
LONG RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult) LONG RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, WINPR_ATTR_UNUSED DWORD ulOptions,
WINPR_ATTR_UNUSED REGSAM samDesired, PHKEY phkResult)
{ {
Reg* reg = RegGetInstance(); Reg* reg = RegGetInstance();
@ -281,25 +315,36 @@ LONG RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesire
return ERROR_FILE_NOT_FOUND; return ERROR_FILE_NOT_FOUND;
} }
LONG RegOpenUserClassesRoot(HANDLE hToken, DWORD dwOptions, REGSAM samDesired, PHKEY phkResult) LONG RegOpenUserClassesRoot(WINPR_ATTR_UNUSED HANDLE hToken, WINPR_ATTR_UNUSED DWORD dwOptions,
WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED PHKEY phkResult)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LONG RegQueryInfoKeyW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPWSTR lpClass,
LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, WINPR_ATTR_UNUSED LPDWORD lpcClass, WINPR_ATTR_UNUSED LPDWORD lpReserved,
LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, WINPR_ATTR_UNUSED LPDWORD lpcSubKeys,
LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime) WINPR_ATTR_UNUSED LPDWORD lpcMaxSubKeyLen,
WINPR_ATTR_UNUSED LPDWORD lpcMaxClassLen, WINPR_ATTR_UNUSED LPDWORD lpcValues,
WINPR_ATTR_UNUSED LPDWORD lpcMaxValueNameLen,
WINPR_ATTR_UNUSED LPDWORD lpcMaxValueLen,
WINPR_ATTR_UNUSED LPDWORD lpcbSecurityDescriptor,
WINPR_ATTR_UNUSED PFILETIME lpftLastWriteTime)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LONG RegQueryInfoKeyA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPSTR lpClass,
LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, WINPR_ATTR_UNUSED LPDWORD lpcClass, WINPR_ATTR_UNUSED LPDWORD lpReserved,
LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, WINPR_ATTR_UNUSED LPDWORD lpcSubKeys,
LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime) WINPR_ATTR_UNUSED LPDWORD lpcMaxSubKeyLen,
WINPR_ATTR_UNUSED LPDWORD lpcMaxClassLen, WINPR_ATTR_UNUSED LPDWORD lpcValues,
WINPR_ATTR_UNUSED LPDWORD lpcMaxValueNameLen,
WINPR_ATTR_UNUSED LPDWORD lpcMaxValueLen,
WINPR_ATTR_UNUSED LPDWORD lpcbSecurityDescriptor,
WINPR_ATTR_UNUSED PFILETIME lpftLastWriteTime)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
@ -497,60 +542,67 @@ LONG RegQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDWORD
return ERROR_FILE_NOT_FOUND; return ERROR_FILE_NOT_FOUND;
} }
LONG RegRestoreKeyW(HKEY hKey, LPCWSTR lpFile, DWORD dwFlags) LONG RegRestoreKeyW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpFile,
WINPR_ATTR_UNUSED DWORD dwFlags)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegRestoreKeyA(HKEY hKey, LPCSTR lpFile, DWORD dwFlags) LONG RegRestoreKeyA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpFile,
WINPR_ATTR_UNUSED DWORD dwFlags)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegSaveKeyExW(HKEY hKey, LPCWSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes, LONG RegSaveKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpFile,
DWORD Flags) WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes,
WINPR_ATTR_UNUSED DWORD Flags)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegSaveKeyExA(HKEY hKey, LPCSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes, LONG RegSaveKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpFile,
DWORD Flags) WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes,
WINPR_ATTR_UNUSED DWORD Flags)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegSetKeySecurity(HKEY hKey, SECURITY_INFORMATION SecurityInformation, LONG RegSetKeySecurity(WINPR_ATTR_UNUSED HKEY hKey,
PSECURITY_DESCRIPTOR pSecurityDescriptor) WINPR_ATTR_UNUSED SECURITY_INFORMATION SecurityInformation,
WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegSetValueExW(HKEY hKey, LPCWSTR lpValueName, DWORD Reserved, DWORD dwType, LONG RegSetValueExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpValueName,
const BYTE* lpData, DWORD cbData) WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED DWORD dwType,
WINPR_ATTR_UNUSED const BYTE* lpData, WINPR_ATTR_UNUSED DWORD cbData)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, const BYTE* lpData, LONG RegSetValueExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpValueName,
DWORD cbData) WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED DWORD dwType,
WINPR_ATTR_UNUSED const BYTE* lpData, WINPR_ATTR_UNUSED DWORD cbData)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegUnLoadKeyW(HKEY hKey, LPCWSTR lpSubKey) LONG RegUnLoadKeyW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;
} }
LONG RegUnLoadKeyA(HKEY hKey, LPCSTR lpSubKey) LONG RegUnLoadKeyA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return -1; return -1;

View File

@ -305,7 +305,7 @@ static char* reg_load_peek_next_line(Reg* reg)
return reg->next_line; return reg->next_line;
} }
static void reg_insert_key(Reg* reg, RegKey* key, RegKey* subkey) static void reg_insert_key(WINPR_ATTR_UNUSED Reg* reg, RegKey* key, RegKey* subkey)
{ {
char* name = NULL; char* name = NULL;
char* path = NULL; char* path = NULL;
@ -430,7 +430,7 @@ static void reg_load(Reg* reg)
reg_load_finish(reg); reg_load_finish(reg);
} }
static void reg_unload_value(Reg* reg, RegVal* value) static void reg_unload_value(WINPR_ATTR_UNUSED Reg* reg, RegVal* value)
{ {
WINPR_ASSERT(reg); WINPR_ASSERT(reg);
WINPR_ASSERT(value); WINPR_ASSERT(value);

File diff suppressed because it is too large Load Diff

View File

@ -122,92 +122,122 @@
*/ */
#ifndef _WIN32 #ifndef _WIN32
#include <winpr/wlog.h>
#include "security.h" #include "security.h"
BOOL InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision) BOOL InitializeSecurityDescriptor(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
WINPR_ATTR_UNUSED DWORD dwRevision)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
DWORD GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor) DWORD GetSecurityDescriptorLength(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor)
{ {
WLog_ERR("TODO", "TODO: Implement");
return 0; return 0;
} }
BOOL IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor) BOOL IsValidSecurityDescriptor(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL GetSecurityDescriptorControl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision) WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR_CONTROL pControl,
WINPR_ATTR_UNUSED LPDWORD lpdwRevision)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL SetSecurityDescriptorControl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest, WINPR_ATTR_UNUSED SECURITY_DESCRIPTOR_CONTROL
SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet) ControlBitsOfInterest,
WINPR_ATTR_UNUSED SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbDaclPresent, BOOL GetSecurityDescriptorDacl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
PACL* pDacl, LPBOOL lpbDaclDefaulted) WINPR_ATTR_UNUSED LPBOOL lpbDaclPresent,
WINPR_ATTR_UNUSED PACL* pDacl,
WINPR_ATTR_UNUSED LPBOOL lpbDaclDefaulted)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, BOOL SetSecurityDescriptorDacl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
PACL pDacl, BOOL bDaclDefaulted) WINPR_ATTR_UNUSED BOOL bDaclPresent, WINPR_ATTR_UNUSED PACL pDacl,
WINPR_ATTR_UNUSED BOOL bDaclDefaulted)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID* pGroup, BOOL GetSecurityDescriptorGroup(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
LPBOOL lpbGroupDefaulted) WINPR_ATTR_UNUSED PSID* pGroup,
WINPR_ATTR_UNUSED LPBOOL lpbGroupDefaulted)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pGroup, BOOL SetSecurityDescriptorGroup(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
BOOL bGroupDefaulted) WINPR_ATTR_UNUSED PSID pGroup,
WINPR_ATTR_UNUSED BOOL bGroupDefaulted)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID* pOwner, BOOL GetSecurityDescriptorOwner(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
LPBOOL lpbOwnerDefaulted) WINPR_ATTR_UNUSED PSID* pOwner,
WINPR_ATTR_UNUSED LPBOOL lpbOwnerDefaulted)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pOwner, BOOL SetSecurityDescriptorOwner(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
BOOL bOwnerDefaulted) WINPR_ATTR_UNUSED PSID pOwner,
WINPR_ATTR_UNUSED BOOL bOwnerDefaulted)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
DWORD GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, PUCHAR RMControl) DWORD GetSecurityDescriptorRMControl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR SecurityDescriptor,
WINPR_ATTR_UNUSED PUCHAR RMControl)
{ {
WLog_ERR("TODO", "TODO: Implement");
return 0; return 0;
} }
DWORD SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, PUCHAR RMControl) DWORD SetSecurityDescriptorRMControl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR SecurityDescriptor,
WINPR_ATTR_UNUSED PUCHAR RMControl)
{ {
WLog_ERR("TODO", "TODO: Implement");
return 0; return 0;
} }
BOOL GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbSaclPresent, BOOL GetSecurityDescriptorSacl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
PACL* pSacl, LPBOOL lpbSaclDefaulted) WINPR_ATTR_UNUSED LPBOOL lpbSaclPresent,
WINPR_ATTR_UNUSED PACL* pSacl,
WINPR_ATTR_UNUSED LPBOOL lpbSaclDefaulted)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }
BOOL SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bSaclPresent, BOOL SetSecurityDescriptorSacl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor,
PACL pSacl, BOOL bSaclDefaulted) WINPR_ATTR_UNUSED BOOL bSaclPresent, WINPR_ATTR_UNUSED PACL pSacl,
WINPR_ATTR_UNUSED BOOL bSaclDefaulted)
{ {
WLog_ERR("TODO", "TODO: Implement");
return TRUE; return TRUE;
} }

View File

@ -82,7 +82,9 @@ const SCARD_IO_REQUEST g_rgSCardT0Pci = { SCARD_PROTOCOL_T0, 8 };
const SCARD_IO_REQUEST g_rgSCardT1Pci = { SCARD_PROTOCOL_T1, 8 }; const SCARD_IO_REQUEST g_rgSCardT1Pci = { SCARD_PROTOCOL_T1, 8 };
const SCARD_IO_REQUEST g_rgSCardRawPci = { SCARD_PROTOCOL_RAW, 8 }; const SCARD_IO_REQUEST g_rgSCardRawPci = { SCARD_PROTOCOL_RAW, 8 };
static BOOL CALLBACK InitializeSCardApiStubs(PINIT_ONCE once, PVOID param, PVOID* context) static BOOL CALLBACK InitializeSCardApiStubs(WINPR_ATTR_UNUSED PINIT_ONCE once,
WINPR_ATTR_UNUSED PVOID param,
WINPR_ATTR_UNUSED PVOID* context)
{ {
#ifdef _WIN32 #ifdef _WIN32
if (Windows_InitializeSCardApi() >= 0) if (Windows_InitializeSCardApi() >= 0)

View File

@ -1062,7 +1062,7 @@ static const char* findCardByAtr(LPCBYTE pbAtr)
return NULL; return NULL;
} }
static LONG WINAPI PCSC_SCardListCardsA(SCARDCONTEXT hContext, LPCBYTE pbAtr, static LONG WINAPI PCSC_SCardListCardsA(WINPR_ATTR_UNUSED SCARDCONTEXT hContext, LPCBYTE pbAtr,
LPCGUID rgquidInterfaces, DWORD cguidInterfaceCount, LPCGUID rgquidInterfaces, DWORD cguidInterfaceCount,
CHAR* mszCards, LPDWORD pcchCards) CHAR* mszCards, LPDWORD pcchCards)
{ {
@ -1115,7 +1115,7 @@ static LONG WINAPI PCSC_SCardListCardsA(SCARDCONTEXT hContext, LPCBYTE pbAtr,
return SCARD_S_SUCCESS; return SCARD_S_SUCCESS;
} }
static LONG WINAPI PCSC_SCardListCardsW(SCARDCONTEXT hContext, LPCBYTE pbAtr, static LONG WINAPI PCSC_SCardListCardsW(WINPR_ATTR_UNUSED SCARDCONTEXT hContext, LPCBYTE pbAtr,
LPCGUID rgquidInterfaces, DWORD cguidInterfaceCount, LPCGUID rgquidInterfaces, DWORD cguidInterfaceCount,
WCHAR* mszCards, LPDWORD pcchCards) WCHAR* mszCards, LPDWORD pcchCards)
{ {

View File

@ -32,18 +32,24 @@
static const char* CREDSSP_PACKAGE_NAME = "CredSSP"; static const char* CREDSSP_PACKAGE_NAME = "CredSSP";
static SECURITY_STATUS SEC_ENTRY credssp_InitializeSecurityContextW( static SECURITY_STATUS SEC_ENTRY credssp_InitializeSecurityContextW(
PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR* pszTargetName, ULONG fContextReq, WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED PCtxtHandle phContext,
ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, WINPR_ATTR_UNUSED SEC_WCHAR* pszTargetName, WINPR_ATTR_UNUSED ULONG fContextReq,
PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry) WINPR_ATTR_UNUSED ULONG Reserved1, WINPR_ATTR_UNUSED ULONG TargetDataRep,
WINPR_ATTR_UNUSED PSecBufferDesc pInput, WINPR_ATTR_UNUSED ULONG Reserved2,
WINPR_ATTR_UNUSED PCtxtHandle phNewContext, WINPR_ATTR_UNUSED PSecBufferDesc pOutput,
WINPR_ATTR_UNUSED PULONG pfContextAttr, WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY credssp_InitializeSecurityContextA( static SECURITY_STATUS SEC_ENTRY credssp_InitializeSecurityContextA(
PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR* pszTargetName, ULONG fContextReq, PCredHandle phCredential, PCtxtHandle phContext, WINPR_ATTR_UNUSED SEC_CHAR* pszTargetName,
ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, WINPR_ATTR_UNUSED ULONG fContextReq, WINPR_ATTR_UNUSED ULONG Reserved1,
PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry) WINPR_ATTR_UNUSED ULONG TargetDataRep, WINPR_ATTR_UNUSED PSecBufferDesc pInput,
WINPR_ATTR_UNUSED ULONG Reserved2, PCtxtHandle phNewContext,
WINPR_ATTR_UNUSED PSecBufferDesc pOutput, WINPR_ATTR_UNUSED PULONG pfContextAttr,
WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
CREDSSP_CONTEXT* context = NULL; CREDSSP_CONTEXT* context = NULL;
SSPI_CREDENTIALS* credentials = NULL; SSPI_CREDENTIALS* credentials = NULL;
@ -100,7 +106,8 @@ void credssp_ContextFree(CREDSSP_CONTEXT* context)
} }
static SECURITY_STATUS SEC_ENTRY credssp_QueryContextAttributes(PCtxtHandle phContext, static SECURITY_STATUS SEC_ENTRY credssp_QueryContextAttributes(PCtxtHandle phContext,
ULONG ulAttribute, void* pBuffer) WINPR_ATTR_UNUSED ULONG ulAttribute,
void* pBuffer)
{ {
if (!phContext) if (!phContext)
return SEC_E_INVALID_HANDLE; return SEC_E_INVALID_HANDLE;
@ -113,18 +120,22 @@ static SECURITY_STATUS SEC_ENTRY credssp_QueryContextAttributes(PCtxtHandle phCo
} }
static SECURITY_STATUS SEC_ENTRY credssp_AcquireCredentialsHandleW( static SECURITY_STATUS SEC_ENTRY credssp_AcquireCredentialsHandleW(
SEC_WCHAR* pszPrincipal, SEC_WCHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, WINPR_ATTR_UNUSED SEC_WCHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_WCHAR* pszPackage,
void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG fCredentialUse, WINPR_ATTR_UNUSED void* pvLogonID,
PTimeStamp ptsExpiry) WINPR_ATTR_UNUSED void* pAuthData, WINPR_ATTR_UNUSED SEC_GET_KEY_FN pGetKeyFn,
WINPR_ATTR_UNUSED void* pvGetKeyArgument, WINPR_ATTR_UNUSED PCredHandle phCredential,
WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY credssp_AcquireCredentialsHandleA( static SECURITY_STATUS SEC_ENTRY credssp_AcquireCredentialsHandleA(
SEC_CHAR* pszPrincipal, SEC_CHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, WINPR_ATTR_UNUSED SEC_CHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_CHAR* pszPackage,
void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG fCredentialUse, WINPR_ATTR_UNUSED void* pvLogonID,
PTimeStamp ptsExpiry) WINPR_ATTR_UNUSED void* pAuthData, WINPR_ATTR_UNUSED SEC_GET_KEY_FN pGetKeyFn,
WINPR_ATTR_UNUSED void* pvGetKeyArgument, WINPR_ATTR_UNUSED PCredHandle phCredential,
WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
SSPI_CREDENTIALS* credentials = NULL; SSPI_CREDENTIALS* credentials = NULL;
SEC_WINNT_AUTH_IDENTITY* identity = NULL; SEC_WINNT_AUTH_IDENTITY* identity = NULL;
@ -154,17 +165,17 @@ static SECURITY_STATUS SEC_ENTRY credssp_AcquireCredentialsHandleA(
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesW(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesW(
ULONG ulAttribute, WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute,
void* pBuffer) WINPR_ATTR_UNUSED void* pBuffer)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesA(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesA(
ULONG ulAttribute, WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute,
void* pBuffer) WINPR_ATTR_UNUSED void* pBuffer)
{ {
if (ulAttribute == SECPKG_CRED_ATTR_NAMES) if (ulAttribute == SECPKG_CRED_ATTR_NAMES)
{ {
@ -197,31 +208,37 @@ static SECURITY_STATUS SEC_ENTRY credssp_FreeCredentialsHandle(PCredHandle phCre
return SEC_E_OK; return SEC_E_OK;
} }
static SECURITY_STATUS SEC_ENTRY credssp_EncryptMessage(PCtxtHandle phContext, ULONG fQOP, static SECURITY_STATUS SEC_ENTRY credssp_EncryptMessage(WINPR_ATTR_UNUSED PCtxtHandle phContext,
PSecBufferDesc pMessage, ULONG MessageSeqNo) WINPR_ATTR_UNUSED ULONG fQOP,
WINPR_ATTR_UNUSED PSecBufferDesc pMessage,
WINPR_ATTR_UNUSED ULONG MessageSeqNo)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY credssp_DecryptMessage(PCtxtHandle phContext, static SECURITY_STATUS SEC_ENTRY credssp_DecryptMessage(WINPR_ATTR_UNUSED PCtxtHandle phContext,
PSecBufferDesc pMessage, ULONG MessageSeqNo, WINPR_ATTR_UNUSED PSecBufferDesc pMessage,
ULONG* pfQOP) WINPR_ATTR_UNUSED ULONG MessageSeqNo,
WINPR_ATTR_UNUSED ULONG* pfQOP)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY credssp_MakeSignature(PCtxtHandle phContext, ULONG fQOP, static SECURITY_STATUS SEC_ENTRY credssp_MakeSignature(WINPR_ATTR_UNUSED PCtxtHandle phContext,
PSecBufferDesc pMessage, ULONG MessageSeqNo) WINPR_ATTR_UNUSED ULONG fQOP,
WINPR_ATTR_UNUSED PSecBufferDesc pMessage,
WINPR_ATTR_UNUSED ULONG MessageSeqNo)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY credssp_VerifySignature(PCtxtHandle phContext, static SECURITY_STATUS SEC_ENTRY credssp_VerifySignature(WINPR_ATTR_UNUSED PCtxtHandle phContext,
PSecBufferDesc pMessage, WINPR_ATTR_UNUSED PSecBufferDesc pMessage,
ULONG MessageSeqNo, ULONG* pfQOP) WINPR_ATTR_UNUSED ULONG MessageSeqNo,
WINPR_ATTR_UNUSED ULONG* pfQOP)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;

View File

@ -201,8 +201,10 @@ static KRB_CONTEXT* kerberos_ContextNew(KRB_CREDENTIALS* credentials)
return context; return context;
} }
static krb5_error_code krb5_prompter(krb5_context context, void* data, const char* name, static krb5_error_code krb5_prompter(krb5_context context, void* data,
const char* banner, int num_prompts, krb5_prompt prompts[]) WINPR_ATTR_UNUSED const char* name,
WINPR_ATTR_UNUSED const char* banner, int num_prompts,
krb5_prompt prompts[])
{ {
for (int i = 0; i < num_prompts; i++) for (int i = 0; i < num_prompts; i++)
{ {
@ -268,9 +270,10 @@ fail:
#endif /* WITH_KRB5 */ #endif /* WITH_KRB5 */
static SECURITY_STATUS SEC_ENTRY kerberos_AcquireCredentialsHandleA( static SECURITY_STATUS SEC_ENTRY kerberos_AcquireCredentialsHandleA(
SEC_CHAR* pszPrincipal, SEC_CHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, SEC_CHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_CHAR* pszPackage, ULONG fCredentialUse,
void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, WINPR_ATTR_UNUSED void* pvLogonID, void* pAuthData, WINPR_ATTR_UNUSED SEC_GET_KEY_FN pGetKeyFn,
PTimeStamp ptsExpiry) WINPR_ATTR_UNUSED void* pvGetKeyArgument, PCredHandle phCredential,
WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
#ifdef WITH_KRB5 #ifdef WITH_KRB5
SEC_WINPR_KERBEROS_SETTINGS* krb_settings = NULL; SEC_WINPR_KERBEROS_SETTINGS* krb_settings = NULL;
@ -552,9 +555,8 @@ static SECURITY_STATUS SEC_ENTRY kerberos_FreeCredentialsHandle(PCredHandle phCr
#endif #endif
} }
static SECURITY_STATUS SEC_ENTRY kerberos_QueryCredentialsAttributesW(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY kerberos_QueryCredentialsAttributesW(
ULONG ulAttribute, WINPR_ATTR_UNUSED PCredHandle phCredential, ULONG ulAttribute, WINPR_ATTR_UNUSED void* pBuffer)
void* pBuffer)
{ {
#ifdef WITH_KRB5 #ifdef WITH_KRB5
switch (ulAttribute) switch (ulAttribute)
@ -908,8 +910,9 @@ static BOOL kerberos_hash_channel_bindings(WINPR_DIGEST_CTX* md5, SEC_CHANNEL_BI
static SECURITY_STATUS SEC_ENTRY kerberos_InitializeSecurityContextA( static SECURITY_STATUS SEC_ENTRY kerberos_InitializeSecurityContextA(
PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR* pszTargetName, ULONG fContextReq, PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR* pszTargetName, ULONG fContextReq,
ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, WINPR_ATTR_UNUSED ULONG Reserved1, WINPR_ATTR_UNUSED ULONG TargetDataRep, PSecBufferDesc pInput,
PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG* pfContextAttr, PTimeStamp ptsExpiry) WINPR_ATTR_UNUSED ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
WINPR_ATTR_UNUSED ULONG* pfContextAttr, WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
#ifdef WITH_KRB5 #ifdef WITH_KRB5
PSecBuffer input_buffer = NULL; PSecBuffer input_buffer = NULL;
@ -1252,9 +1255,10 @@ static SECURITY_STATUS SEC_ENTRY kerberos_InitializeSecurityContextW(
} }
static SECURITY_STATUS SEC_ENTRY kerberos_AcceptSecurityContext( static SECURITY_STATUS SEC_ENTRY kerberos_AcceptSecurityContext(
PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput,
ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG* pfContextAttr, WINPR_ATTR_UNUSED ULONG fContextReq, WINPR_ATTR_UNUSED ULONG TargetDataRep,
PTimeStamp ptsExpity) PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG* pfContextAttr,
WINPR_ATTR_UNUSED PTimeStamp ptsExpity)
{ {
#ifdef WITH_KRB5 #ifdef WITH_KRB5
BOOL isNewContext = FALSE; BOOL isNewContext = FALSE;
@ -1710,16 +1714,16 @@ static SECURITY_STATUS SEC_ENTRY kerberos_QueryContextAttributesW(PCtxtHandle ph
return kerberos_QueryContextAttributesA(phContext, ulAttribute, pBuffer); return kerberos_QueryContextAttributesA(phContext, ulAttribute, pBuffer);
} }
static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesW(PCtxtHandle phContext, static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesW(
ULONG ulAttribute, void* pBuffer, WINPR_ATTR_UNUSED PCtxtHandle phContext, WINPR_ATTR_UNUSED ULONG ulAttribute,
ULONG cbBuffer) WINPR_ATTR_UNUSED void* pBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer)
{ {
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesA(PCtxtHandle phContext, static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesA(
ULONG ulAttribute, void* pBuffer, WINPR_ATTR_UNUSED PCtxtHandle phContext, WINPR_ATTR_UNUSED ULONG ulAttribute,
ULONG cbBuffer) WINPR_ATTR_UNUSED void* pBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer)
{ {
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
@ -1727,7 +1731,7 @@ static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesA(PCtxtHandle phCo
static SECURITY_STATUS SEC_ENTRY kerberos_SetCredentialsAttributesX(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY kerberos_SetCredentialsAttributesX(PCredHandle phCredential,
ULONG ulAttribute, ULONG ulAttribute,
void* pBuffer, ULONG cbBuffer, void* pBuffer, ULONG cbBuffer,
BOOL unicode) WINPR_ATTR_UNUSED BOOL unicode)
{ {
#ifdef WITH_KRB5 #ifdef WITH_KRB5
KRB_CREDENTIALS* credentials = NULL; KRB_CREDENTIALS* credentials = NULL;
@ -1998,7 +2002,8 @@ static SECURITY_STATUS SEC_ENTRY kerberos_DecryptMessage(PCtxtHandle phContext,
#endif #endif
} }
static SECURITY_STATUS SEC_ENTRY kerberos_MakeSignature(PCtxtHandle phContext, ULONG fQOP, static SECURITY_STATUS SEC_ENTRY kerberos_MakeSignature(PCtxtHandle phContext,
WINPR_ATTR_UNUSED ULONG fQOP,
PSecBufferDesc pMessage, ULONG MessageSeqNo) PSecBufferDesc pMessage, ULONG MessageSeqNo)
{ {
#ifdef WITH_KRB5 #ifdef WITH_KRB5
@ -2070,7 +2075,8 @@ static SECURITY_STATUS SEC_ENTRY kerberos_MakeSignature(PCtxtHandle phContext, U
static SECURITY_STATUS SEC_ENTRY kerberos_VerifySignature(PCtxtHandle phContext, static SECURITY_STATUS SEC_ENTRY kerberos_VerifySignature(PCtxtHandle phContext,
PSecBufferDesc pMessage, PSecBufferDesc pMessage,
ULONG MessageSeqNo, ULONG* pfQOP) ULONG MessageSeqNo,
WINPR_ATTR_UNUSED ULONG* pfQOP)
{ {
#ifdef WITH_KRB5 #ifdef WITH_KRB5
PSecBuffer sig_buffer = NULL; PSecBuffer sig_buffer = NULL;

View File

@ -357,9 +357,10 @@ static void ntlm_ContextFree(NTLM_CONTEXT* context)
} }
static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW( static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
SEC_WCHAR* pszPrincipal, SEC_WCHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, WINPR_ATTR_UNUSED SEC_WCHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_WCHAR* pszPackage,
void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, ULONG fCredentialUse, WINPR_ATTR_UNUSED void* pvLogonID, void* pAuthData,
PTimeStamp ptsExpiry) SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential,
WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
SEC_WINPR_NTLM_SETTINGS* settings = NULL; SEC_WINPR_NTLM_SETTINGS* settings = NULL;
@ -457,8 +458,9 @@ static SECURITY_STATUS SEC_ENTRY ntlm_FreeCredentialsHandle(PCredHandle phCreden
return SEC_E_OK; return SEC_E_OK;
} }
static SECURITY_STATUS SEC_ENTRY ntlm_QueryCredentialsAttributesW(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY ntlm_QueryCredentialsAttributesW(
ULONG ulAttribute, void* pBuffer) WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute,
WINPR_ATTR_UNUSED void* pBuffer)
{ {
if (ulAttribute == SECPKG_CRED_ATTR_NAMES) if (ulAttribute == SECPKG_CRED_ATTR_NAMES)
{ {
@ -478,10 +480,10 @@ static SECURITY_STATUS SEC_ENTRY ntlm_QueryCredentialsAttributesA(PCredHandle ph
/** /**
* @see http://msdn.microsoft.com/en-us/library/windows/desktop/aa374707 * @see http://msdn.microsoft.com/en-us/library/windows/desktop/aa374707
*/ */
static SECURITY_STATUS SEC_ENTRY static SECURITY_STATUS SEC_ENTRY ntlm_AcceptSecurityContext(
ntlm_AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq,
ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, WINPR_ATTR_UNUSED ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsTimeStamp) WINPR_ATTR_UNUSED PULONG pfContextAttr, WINPR_ATTR_UNUSED PTimeStamp ptsTimeStamp)
{ {
SECURITY_STATUS status = 0; SECURITY_STATUS status = 0;
SSPI_CREDENTIALS* credentials = NULL; SSPI_CREDENTIALS* credentials = NULL;
@ -598,15 +600,17 @@ ntlm_AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext, PSec
} }
} }
static SECURITY_STATUS SEC_ENTRY ntlm_ImpersonateSecurityContext(PCtxtHandle phContext) static SECURITY_STATUS SEC_ENTRY
ntlm_ImpersonateSecurityContext(WINPR_ATTR_UNUSED PCtxtHandle phContext)
{ {
return SEC_E_OK; return SEC_E_OK;
} }
static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR* pszTargetName, ULONG fContextReq, PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR* pszTargetName, ULONG fContextReq,
ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, WINPR_ATTR_UNUSED ULONG Reserved1, WINPR_ATTR_UNUSED ULONG TargetDataRep, PSecBufferDesc pInput,
PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry) WINPR_ATTR_UNUSED ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
WINPR_ATTR_UNUSED PULONG pfContextAttr, WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
SECURITY_STATUS status = 0; SECURITY_STATUS status = 0;
SSPI_CREDENTIALS* credentials = NULL; SSPI_CREDENTIALS* credentials = NULL;
@ -1024,26 +1028,27 @@ static SECURITY_STATUS SEC_ENTRY ntlm_SetContextAttributesA(PCtxtHandle phContex
return ntlm_SetContextAttributesW(phContext, ulAttribute, pBuffer, cbBuffer); return ntlm_SetContextAttributesW(phContext, ulAttribute, pBuffer, cbBuffer);
} }
static SECURITY_STATUS SEC_ENTRY ntlm_SetCredentialsAttributesW(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY ntlm_SetCredentialsAttributesW(
ULONG ulAttribute, void* pBuffer, WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute,
ULONG cbBuffer) WINPR_ATTR_UNUSED void* pBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer)
{ {
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY ntlm_SetCredentialsAttributesA(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY ntlm_SetCredentialsAttributesA(
ULONG ulAttribute, void* pBuffer, WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute,
ULONG cbBuffer) WINPR_ATTR_UNUSED void* pBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer)
{ {
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY ntlm_RevertSecurityContext(PCtxtHandle phContext) static SECURITY_STATUS SEC_ENTRY ntlm_RevertSecurityContext(WINPR_ATTR_UNUSED PCtxtHandle phContext)
{ {
return SEC_E_OK; return SEC_E_OK;
} }
static SECURITY_STATUS SEC_ENTRY ntlm_EncryptMessage(PCtxtHandle phContext, ULONG fQOP, static SECURITY_STATUS SEC_ENTRY ntlm_EncryptMessage(PCtxtHandle phContext,
WINPR_ATTR_UNUSED ULONG fQOP,
PSecBufferDesc pMessage, ULONG MessageSeqNo) PSecBufferDesc pMessage, ULONG MessageSeqNo)
{ {
const UINT32 SeqNo = MessageSeqNo; const UINT32 SeqNo = MessageSeqNo;
@ -1136,7 +1141,8 @@ static SECURITY_STATUS SEC_ENTRY ntlm_EncryptMessage(PCtxtHandle phContext, ULON
} }
static SECURITY_STATUS SEC_ENTRY ntlm_DecryptMessage(PCtxtHandle phContext, PSecBufferDesc pMessage, static SECURITY_STATUS SEC_ENTRY ntlm_DecryptMessage(PCtxtHandle phContext, PSecBufferDesc pMessage,
ULONG MessageSeqNo, PULONG pfQOP) ULONG MessageSeqNo,
WINPR_ATTR_UNUSED PULONG pfQOP)
{ {
const UINT32 SeqNo = (UINT32)MessageSeqNo; const UINT32 SeqNo = (UINT32)MessageSeqNo;
UINT32 value = 0; UINT32 value = 0;
@ -1230,7 +1236,8 @@ static SECURITY_STATUS SEC_ENTRY ntlm_DecryptMessage(PCtxtHandle phContext, PSec
return SEC_E_OK; return SEC_E_OK;
} }
static SECURITY_STATUS SEC_ENTRY ntlm_MakeSignature(PCtxtHandle phContext, ULONG fQOP, static SECURITY_STATUS SEC_ENTRY ntlm_MakeSignature(PCtxtHandle phContext,
WINPR_ATTR_UNUSED ULONG fQOP,
PSecBufferDesc pMessage, ULONG MessageSeqNo) PSecBufferDesc pMessage, ULONG MessageSeqNo)
{ {
PSecBuffer data_buffer = NULL; PSecBuffer data_buffer = NULL;
@ -1281,7 +1288,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_MakeSignature(PCtxtHandle phContext, ULONG
static SECURITY_STATUS SEC_ENTRY ntlm_VerifySignature(PCtxtHandle phContext, static SECURITY_STATUS SEC_ENTRY ntlm_VerifySignature(PCtxtHandle phContext,
PSecBufferDesc pMessage, ULONG MessageSeqNo, PSecBufferDesc pMessage, ULONG MessageSeqNo,
PULONG pfQOP) WINPR_ATTR_UNUSED PULONG pfQOP)
{ {
PSecBuffer data_buffer = NULL; PSecBuffer data_buffer = NULL;
PSecBuffer sig_buffer = NULL; PSecBuffer sig_buffer = NULL;

View File

@ -323,7 +323,8 @@ static char* get_name(COMPUTER_NAME_FORMAT type)
return computerName; return computerName;
} }
static int ntlm_get_target_computer_name(PUNICODE_STRING pName, COMPUTER_NAME_FORMAT type) static int ntlm_get_target_computer_name(PUNICODE_STRING pName,
WINPR_ATTR_UNUSED COMPUTER_NAME_FORMAT type)
{ {
int status = -1; int status = -1;

View File

@ -448,7 +448,7 @@ static BOOL ntlm_write_negotiate_flags(wStream* s, UINT32 flags, const char* nam
} }
static BOOL ntlm_read_message_integrity_check(wStream* s, size_t* offset, BYTE* data, size_t size, static BOOL ntlm_read_message_integrity_check(wStream* s, size_t* offset, BYTE* data, size_t size,
const char* name) WINPR_ATTR_UNUSED const char* name)
{ {
WINPR_ASSERT(s); WINPR_ASSERT(s);
WINPR_ASSERT(offset); WINPR_ASSERT(offset);
@ -466,7 +466,7 @@ static BOOL ntlm_read_message_integrity_check(wStream* s, size_t* offset, BYTE*
} }
static BOOL ntlm_write_message_integrity_check(wStream* s, size_t offset, const BYTE* data, static BOOL ntlm_write_message_integrity_check(wStream* s, size_t offset, const BYTE* data,
size_t size, const char* name) size_t size, WINPR_ATTR_UNUSED const char* name)
{ {
size_t pos = 0; size_t pos = 0;

View File

@ -1244,12 +1244,14 @@ static SECURITY_STATUS SEC_ENTRY negotiate_DeleteSecurityContext(PCtxtHandle phC
return status; return status;
} }
static SECURITY_STATUS SEC_ENTRY negotiate_ImpersonateSecurityContext(PCtxtHandle phContext) static SECURITY_STATUS SEC_ENTRY
negotiate_ImpersonateSecurityContext(WINPR_ATTR_UNUSED PCtxtHandle phContext)
{ {
return SEC_E_OK; return SEC_E_OK;
} }
static SECURITY_STATUS SEC_ENTRY negotiate_RevertSecurityContext(PCtxtHandle phContext) static SECURITY_STATUS SEC_ENTRY
negotiate_RevertSecurityContext(WINPR_ATTR_UNUSED PCtxtHandle phContext)
{ {
return SEC_E_OK; return SEC_E_OK;
} }
@ -1484,17 +1486,17 @@ static SECURITY_STATUS SEC_ENTRY negotiate_AcquireCredentialsHandleA(
return SEC_E_OK; return SEC_E_OK;
} }
static SECURITY_STATUS SEC_ENTRY negotiate_QueryCredentialsAttributesW(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY negotiate_QueryCredentialsAttributesW(
ULONG ulAttribute, WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute,
void* pBuffer) WINPR_ATTR_UNUSED void* pBuffer)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY negotiate_QueryCredentialsAttributesA(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY negotiate_QueryCredentialsAttributesA(
ULONG ulAttribute, WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute,
void* pBuffer) WINPR_ATTR_UNUSED void* pBuffer)
{ {
WLog_ERR(TAG, "TODO: Implement"); WLog_ERR(TAG, "TODO: Implement");
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;

View File

@ -88,9 +88,8 @@ static ALG_ID schannel_SupportedAlgs[] = { CALG_AES_128,
CALG_DSS_SIGN, CALG_DSS_SIGN,
CALG_ECDSA }; CALG_ECDSA };
static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesW(PCredHandle phCredential, static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesW(
ULONG ulAttribute, WINPR_ATTR_UNUSED PCredHandle phCredential, ULONG ulAttribute, void* pBuffer)
void* pBuffer)
{ {
if (ulAttribute == SECPKG_ATTR_SUPPORTED_ALGS) if (ulAttribute == SECPKG_ATTR_SUPPORTED_ALGS)
{ {
@ -126,9 +125,10 @@ static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesA(PCredHandl
} }
static SECURITY_STATUS SEC_ENTRY schannel_AcquireCredentialsHandleW( static SECURITY_STATUS SEC_ENTRY schannel_AcquireCredentialsHandleW(
SEC_WCHAR* pszPrincipal, SEC_WCHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, WINPR_ATTR_UNUSED SEC_WCHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_WCHAR* pszPackage,
void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, ULONG fCredentialUse, WINPR_ATTR_UNUSED void* pvLogonID, void* pAuthData,
PTimeStamp ptsExpiry) WINPR_ATTR_UNUSED SEC_GET_KEY_FN pGetKeyFn, WINPR_ATTR_UNUSED void* pvGetKeyArgument,
PCredHandle phCredential, WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
SCHANNEL_CREDENTIALS* credentials = NULL; SCHANNEL_CREDENTIALS* credentials = NULL;
@ -198,9 +198,11 @@ static SECURITY_STATUS SEC_ENTRY schannel_FreeCredentialsHandle(PCredHandle phCr
} }
static SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextW( static SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextW(
PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR* pszTargetName, ULONG fContextReq, PCredHandle phCredential, PCtxtHandle phContext, WINPR_ATTR_UNUSED SEC_WCHAR* pszTargetName,
ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, WINPR_ATTR_UNUSED ULONG fContextReq, WINPR_ATTR_UNUSED ULONG Reserved1,
PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry) WINPR_ATTR_UNUSED ULONG TargetDataRep, PSecBufferDesc pInput, WINPR_ATTR_UNUSED ULONG Reserved2,
PCtxtHandle phNewContext, PSecBufferDesc pOutput, WINPR_ATTR_UNUSED PULONG pfContextAttr,
WINPR_ATTR_UNUSED PTimeStamp ptsExpiry)
{ {
SECURITY_STATUS status = 0; SECURITY_STATUS status = 0;
SCHANNEL_CONTEXT* context = NULL; SCHANNEL_CONTEXT* context = NULL;
@ -254,9 +256,10 @@ static SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextA(
} }
static SECURITY_STATUS SEC_ENTRY schannel_AcceptSecurityContext( static SECURITY_STATUS SEC_ENTRY schannel_AcceptSecurityContext(
PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, WINPR_ATTR_UNUSED PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput,
ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, WINPR_ATTR_UNUSED ULONG fContextReq, WINPR_ATTR_UNUSED ULONG TargetDataRep,
PTimeStamp ptsTimeStamp) PCtxtHandle phNewContext, PSecBufferDesc pOutput, WINPR_ATTR_UNUSED PULONG pfContextAttr,
WINPR_ATTR_UNUSED PTimeStamp ptsTimeStamp)
{ {
SECURITY_STATUS status = 0; SECURITY_STATUS status = 0;
SCHANNEL_CONTEXT* context = NULL; SCHANNEL_CONTEXT* context = NULL;
@ -329,22 +332,26 @@ static SECURITY_STATUS SEC_ENTRY schannel_QueryContextAttributes(PCtxtHandle phC
return SEC_E_UNSUPPORTED_FUNCTION; return SEC_E_UNSUPPORTED_FUNCTION;
} }
static SECURITY_STATUS SEC_ENTRY schannel_MakeSignature(PCtxtHandle phContext, ULONG fQOP, static SECURITY_STATUS SEC_ENTRY schannel_MakeSignature(WINPR_ATTR_UNUSED PCtxtHandle phContext,
PSecBufferDesc pMessage, ULONG MessageSeqNo) WINPR_ATTR_UNUSED ULONG fQOP,
WINPR_ATTR_UNUSED PSecBufferDesc pMessage,
WINPR_ATTR_UNUSED ULONG MessageSeqNo)
{ {
return SEC_E_OK; return SEC_E_OK;
} }
static SECURITY_STATUS SEC_ENTRY schannel_VerifySignature(PCtxtHandle phContext, static SECURITY_STATUS SEC_ENTRY schannel_VerifySignature(WINPR_ATTR_UNUSED PCtxtHandle phContext,
PSecBufferDesc pMessage, WINPR_ATTR_UNUSED PSecBufferDesc pMessage,
ULONG MessageSeqNo, ULONG* pfQOP) WINPR_ATTR_UNUSED ULONG MessageSeqNo,
WINPR_ATTR_UNUSED ULONG* pfQOP)
{ {
return SEC_E_OK; return SEC_E_OK;
} }
static SECURITY_STATUS SEC_ENTRY schannel_EncryptMessage(PCtxtHandle phContext, ULONG fQOP, static SECURITY_STATUS SEC_ENTRY schannel_EncryptMessage(WINPR_ATTR_UNUSED PCtxtHandle phContext,
WINPR_ATTR_UNUSED ULONG fQOP,
PSecBufferDesc pMessage, PSecBufferDesc pMessage,
ULONG MessageSeqNo) WINPR_ATTR_UNUSED ULONG MessageSeqNo)
{ {
SECURITY_STATUS status = 0; SECURITY_STATUS status = 0;
SCHANNEL_CONTEXT* context = NULL; SCHANNEL_CONTEXT* context = NULL;
@ -359,7 +366,8 @@ static SECURITY_STATUS SEC_ENTRY schannel_EncryptMessage(PCtxtHandle phContext,
static SECURITY_STATUS SEC_ENTRY schannel_DecryptMessage(PCtxtHandle phContext, static SECURITY_STATUS SEC_ENTRY schannel_DecryptMessage(PCtxtHandle phContext,
PSecBufferDesc pMessage, PSecBufferDesc pMessage,
ULONG MessageSeqNo, ULONG* pfQOP) WINPR_ATTR_UNUSED ULONG MessageSeqNo,
WINPR_ATTR_UNUSED ULONG* pfQOP)
{ {
SECURITY_STATUS status = 0; SECURITY_STATUS status = 0;
SCHANNEL_CONTEXT* context = NULL; SCHANNEL_CONTEXT* context = NULL;

View File

@ -157,7 +157,9 @@ BOOL InitializeSspiModule_Native(void)
} }
#endif #endif
static BOOL CALLBACK InitializeSspiModuleInt(PINIT_ONCE once, PVOID param, PVOID* context) static BOOL CALLBACK InitializeSspiModuleInt(WINPR_ATTR_UNUSED PINIT_ONCE once,
WINPR_ATTR_UNUSED PVOID param,
WINPR_ATTR_UNUSED PVOID* context)
{ {
BOOL status = FALSE; BOOL status = FALSE;
#if defined(WITH_NATIVE_SSPI) #if defined(WITH_NATIVE_SSPI)

View File

@ -975,7 +975,8 @@ static BOOL WINPR_init(void)
return TRUE; return TRUE;
} }
static BOOL CALLBACK sspi_init(PINIT_ONCE InitOnce, PVOID Parameter, PVOID* Context) static BOOL CALLBACK sspi_init(WINPR_ATTR_UNUSED PINIT_ONCE InitOnce,
WINPR_ATTR_UNUSED PVOID Parameter, WINPR_ATTR_UNUSED PVOID* Context)
{ {
winpr_InitializeSSL(WINPR_SSL_INIT_DEFAULT); winpr_InitializeSSL(WINPR_SSL_INIT_DEFAULT);
sspi_ContextBufferAllocTableNew(); sspi_ContextBufferAllocTableNew();

View File

@ -126,8 +126,9 @@ static HANDLE_OPS ops = { LogonUserIsHandled,
NULL, NULL,
NULL }; NULL };
BOOL LogonUserA(LPCSTR lpszUsername, LPCSTR lpszDomain, LPCSTR lpszPassword, DWORD dwLogonType, BOOL LogonUserA(LPCSTR lpszUsername, LPCSTR lpszDomain, WINPR_ATTR_UNUSED LPCSTR lpszPassword,
DWORD dwLogonProvider, PHANDLE phToken) WINPR_ATTR_UNUSED DWORD dwLogonType, WINPR_ATTR_UNUSED DWORD dwLogonProvider,
PHANDLE phToken)
{ {
if (!lpszUsername) if (!lpszUsername)
return FALSE; return FALSE;
@ -182,23 +183,33 @@ fail:
return FALSE; return FALSE;
} }
BOOL LogonUserW(LPCWSTR lpszUsername, LPCWSTR lpszDomain, LPCWSTR lpszPassword, DWORD dwLogonType, BOOL LogonUserW(WINPR_ATTR_UNUSED LPCWSTR lpszUsername, WINPR_ATTR_UNUSED LPCWSTR lpszDomain,
DWORD dwLogonProvider, PHANDLE phToken) WINPR_ATTR_UNUSED LPCWSTR lpszPassword, WINPR_ATTR_UNUSED DWORD dwLogonType,
WINPR_ATTR_UNUSED DWORD dwLogonProvider, WINPR_ATTR_UNUSED PHANDLE phToken)
{ {
WLog_ERR("TODO", "TODO: implement");
return TRUE; return TRUE;
} }
BOOL LogonUserExA(LPCSTR lpszUsername, LPCSTR lpszDomain, LPCSTR lpszPassword, DWORD dwLogonType, BOOL LogonUserExA(WINPR_ATTR_UNUSED LPCSTR lpszUsername, WINPR_ATTR_UNUSED LPCSTR lpszDomain,
DWORD dwLogonProvider, PHANDLE phToken, PSID* ppLogonSid, PVOID* ppProfileBuffer, WINPR_ATTR_UNUSED LPCSTR lpszPassword, WINPR_ATTR_UNUSED DWORD dwLogonType,
LPDWORD pdwProfileLength, PQUOTA_LIMITS pQuotaLimits) WINPR_ATTR_UNUSED DWORD dwLogonProvider, WINPR_ATTR_UNUSED PHANDLE phToken,
WINPR_ATTR_UNUSED PSID* ppLogonSid, WINPR_ATTR_UNUSED PVOID* ppProfileBuffer,
WINPR_ATTR_UNUSED LPDWORD pdwProfileLength,
WINPR_ATTR_UNUSED PQUOTA_LIMITS pQuotaLimits)
{ {
WLog_ERR("TODO", "TODO: implement");
return TRUE; return TRUE;
} }
BOOL LogonUserExW(LPCWSTR lpszUsername, LPCWSTR lpszDomain, LPCWSTR lpszPassword, DWORD dwLogonType, BOOL LogonUserExW(WINPR_ATTR_UNUSED LPCWSTR lpszUsername, WINPR_ATTR_UNUSED LPCWSTR lpszDomain,
DWORD dwLogonProvider, PHANDLE phToken, PSID* ppLogonSid, PVOID* ppProfileBuffer, WINPR_ATTR_UNUSED LPCWSTR lpszPassword, WINPR_ATTR_UNUSED DWORD dwLogonType,
LPDWORD pdwProfileLength, PQUOTA_LIMITS pQuotaLimits) WINPR_ATTR_UNUSED DWORD dwLogonProvider, WINPR_ATTR_UNUSED PHANDLE phToken,
WINPR_ATTR_UNUSED PSID* ppLogonSid, WINPR_ATTR_UNUSED PVOID* ppProfileBuffer,
WINPR_ATTR_UNUSED LPDWORD pdwProfileLength,
WINPR_ATTR_UNUSED PQUOTA_LIMITS pQuotaLimits)
{ {
WLog_ERR("TODO", "TODO: implement");
return TRUE; return TRUE;
} }

View File

@ -29,16 +29,16 @@
#ifndef _WIN32 #ifndef _WIN32
VOID WakeByAddressAll(PVOID Address) VOID WakeByAddressAll(WINPR_ATTR_UNUSED PVOID Address)
{ {
} }
VOID WakeByAddressSingle(PVOID Address) VOID WakeByAddressSingle(WINPR_ATTR_UNUSED PVOID Address)
{ {
} }
BOOL WaitOnAddress(VOID volatile* Address, PVOID CompareAddress, size_t AddressSize, BOOL WaitOnAddress(WINPR_ATTR_UNUSED VOID volatile* Address, WINPR_ATTR_UNUSED PVOID CompareAddress,
DWORD dwMilliseconds) WINPR_ATTR_UNUSED size_t AddressSize, WINPR_ATTR_UNUSED DWORD dwMilliseconds)
{ {
return TRUE; return TRUE;
} }

View File

@ -102,7 +102,8 @@ BOOL InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION lpCriticalSection,
return InitializeCriticalSectionEx(lpCriticalSection, dwSpinCount, 0); return InitializeCriticalSectionEx(lpCriticalSection, dwSpinCount, 0);
} }
DWORD SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount) DWORD SetCriticalSectionSpinCount(WINPR_ATTR_UNUSED LPCRITICAL_SECTION lpCriticalSection,
WINPR_ATTR_UNUSED DWORD dwSpinCount)
{ {
WINPR_ASSERT(lpCriticalSection); WINPR_ASSERT(lpCriticalSection);
#if !defined(WINPR_CRITICAL_SECTION_DISABLE_SPINCOUNT) #if !defined(WINPR_CRITICAL_SECTION_DISABLE_SPINCOUNT)
@ -121,6 +122,7 @@ DWORD SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection, DWORD dw
lpCriticalSection->SpinCount = dwSpinCount; lpCriticalSection->SpinCount = dwSpinCount;
return dwPreviousSpinCount; return dwPreviousSpinCount;
#else #else
// WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
#endif #endif
} }

View File

@ -423,8 +423,9 @@ BOOL ResetEvent(HANDLE hEvent)
#endif #endif
HANDLE CreateFileDescriptorEventW(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, HANDLE CreateFileDescriptorEventW(WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpEventAttributes,
BOOL bInitialState, int FileDescriptor, ULONG mode) BOOL bManualReset, WINPR_ATTR_UNUSED BOOL bInitialState,
int FileDescriptor, ULONG mode)
{ {
#ifndef _WIN32 #ifndef _WIN32
WINPR_EVENT* event = NULL; WINPR_EVENT* event = NULL;

View File

@ -29,20 +29,23 @@
#if (!defined(_WIN32)) || (defined(_WIN32) && (_WIN32_WINNT < 0x0600)) #if (!defined(_WIN32)) || (defined(_WIN32) && (_WIN32_WINNT < 0x0600))
BOOL winpr_InitOnceBeginInitialize(LPINIT_ONCE lpInitOnce, DWORD dwFlags, PBOOL fPending, BOOL winpr_InitOnceBeginInitialize(WINPR_ATTR_UNUSED LPINIT_ONCE lpInitOnce,
LPVOID* lpContext) WINPR_ATTR_UNUSED DWORD dwFlags,
WINPR_ATTR_UNUSED PBOOL fPending,
WINPR_ATTR_UNUSED LPVOID* lpContext)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return FALSE; return FALSE;
} }
BOOL winpr_InitOnceComplete(LPINIT_ONCE lpInitOnce, DWORD dwFlags, LPVOID lpContext) BOOL winpr_InitOnceComplete(WINPR_ATTR_UNUSED LPINIT_ONCE lpInitOnce,
WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED LPVOID lpContext)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return FALSE; return FALSE;
} }
VOID winpr_InitOnceInitialize(PINIT_ONCE InitOnce) VOID winpr_InitOnceInitialize(WINPR_ATTR_UNUSED PINIT_ONCE InitOnce)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
} }

View File

@ -126,8 +126,9 @@ static HANDLE_OPS ops = { SemaphoreIsHandled,
NULL, NULL,
NULL }; NULL };
HANDLE CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, HANDLE CreateSemaphoreW(WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
LONG lMaximumCount, LPCWSTR lpName) LONG lInitialCount, WINPR_ATTR_UNUSED LONG lMaximumCount,
WINPR_ATTR_UNUSED LPCWSTR lpName)
{ {
HANDLE handle = NULL; HANDLE handle = NULL;
WINPR_SEMAPHORE* semaphore = NULL; WINPR_SEMAPHORE* semaphore = NULL;
@ -193,24 +194,27 @@ HANDLE CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lIniti
} }
HANDLE CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, HANDLE CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount,
LONG lMaximumCount, LPCSTR lpName) LONG lMaximumCount, WINPR_ATTR_UNUSED LPCSTR lpName)
{ {
return CreateSemaphoreW(lpSemaphoreAttributes, lInitialCount, lMaximumCount, NULL); return CreateSemaphoreW(lpSemaphoreAttributes, lInitialCount, lMaximumCount, NULL);
} }
HANDLE OpenSemaphoreW(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName) HANDLE OpenSemaphoreW(WINPR_ATTR_UNUSED DWORD dwDesiredAccess,
WINPR_ATTR_UNUSED BOOL bInheritHandle, WINPR_ATTR_UNUSED LPCWSTR lpName)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return NULL; return NULL;
} }
HANDLE OpenSemaphoreA(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName) HANDLE OpenSemaphoreA(WINPR_ATTR_UNUSED DWORD dwDesiredAccess,
WINPR_ATTR_UNUSED BOOL bInheritHandle, WINPR_ATTR_UNUSED LPCSTR lpName)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return NULL; return NULL;
} }
BOOL ReleaseSemaphore(HANDLE hSemaphore, LONG lReleaseCount, LPLONG lpPreviousCount) BOOL ReleaseSemaphore(HANDLE hSemaphore, LONG lReleaseCount,
WINPR_ATTR_UNUSED LPLONG lpPreviousCount)
{ {
ULONG Type = 0; ULONG Type = 0;
WINPR_HANDLE* Object = NULL; WINPR_HANDLE* Object = NULL;

View File

@ -619,20 +619,25 @@ BOOL SetWaitableTimer(HANDLE hTimer, const LARGE_INTEGER* lpDueTime, LONG lPerio
BOOL SetWaitableTimerEx(HANDLE hTimer, const LARGE_INTEGER* lpDueTime, LONG lPeriod, BOOL SetWaitableTimerEx(HANDLE hTimer, const LARGE_INTEGER* lpDueTime, LONG lPeriod,
PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine,
PREASON_CONTEXT WakeContext, ULONG TolerableDelay) WINPR_ATTR_UNUSED PREASON_CONTEXT WakeContext,
WINPR_ATTR_UNUSED ULONG TolerableDelay)
{ {
return SetWaitableTimer(hTimer, lpDueTime, lPeriod, pfnCompletionRoutine, return SetWaitableTimer(hTimer, lpDueTime, lPeriod, pfnCompletionRoutine,
lpArgToCompletionRoutine, FALSE); lpArgToCompletionRoutine, FALSE);
} }
HANDLE OpenWaitableTimerA(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpTimerName) HANDLE OpenWaitableTimerA(WINPR_ATTR_UNUSED DWORD dwDesiredAccess,
WINPR_ATTR_UNUSED BOOL bInheritHandle,
WINPR_ATTR_UNUSED LPCSTR lpTimerName)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
return NULL; return NULL;
} }
HANDLE OpenWaitableTimerW(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpTimerName) HANDLE OpenWaitableTimerW(WINPR_ATTR_UNUSED DWORD dwDesiredAccess,
WINPR_ATTR_UNUSED BOOL bInheritHandle,
WINPR_ATTR_UNUSED LPCWSTR lpTimerName)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");

View File

@ -266,9 +266,10 @@ void GetSystemTime(LPSYSTEMTIME lpSystemTime)
} }
} }
BOOL SetSystemTime(CONST SYSTEMTIME* lpSystemTime) BOOL SetSystemTime(WINPR_ATTR_UNUSED CONST SYSTEMTIME* lpSystemTime)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR("TODO", "TODO: Implement");
return FALSE; return FALSE;
} }
@ -296,9 +297,10 @@ VOID GetLocalTime(LPSYSTEMTIME lpSystemTime)
} }
} }
BOOL SetLocalTime(CONST SYSTEMTIME* lpSystemTime) BOOL SetLocalTime(WINPR_ATTR_UNUSED CONST SYSTEMTIME* lpSystemTime)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR("TODO", "TODO: Implement");
return FALSE; return FALSE;
} }
@ -314,10 +316,12 @@ VOID GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime)
*lpSystemTimeAsFileTime = t.ft; *lpSystemTimeAsFileTime = t.ft;
} }
BOOL GetSystemTimeAdjustment(PDWORD lpTimeAdjustment, PDWORD lpTimeIncrement, BOOL GetSystemTimeAdjustment(WINPR_ATTR_UNUSED PDWORD lpTimeAdjustment,
PBOOL lpTimeAdjustmentDisabled) WINPR_ATTR_UNUSED PDWORD lpTimeIncrement,
WINPR_ATTR_UNUSED PBOOL lpTimeAdjustmentDisabled)
{ {
/* TODO: Implement */ /* TODO: Implement */
WLog_ERR("TODO", "TODO: Implement");
return FALSE; return FALSE;
} }

View File

@ -271,8 +271,9 @@ LPSTR* CommandLineToArgvA(LPCSTR lpCmdLine, int* pNumArgs)
#ifndef _WIN32 #ifndef _WIN32
LPWSTR* CommandLineToArgvW(LPCWSTR lpCmdLine, int* pNumArgs) LPWSTR* CommandLineToArgvW(WINPR_ATTR_UNUSED LPCWSTR lpCmdLine, WINPR_ATTR_UNUSED int* pNumArgs)
{ {
WLog_ERR("TODO", "TODO: Implement");
return NULL; return NULL;
} }

View File

@ -24,6 +24,7 @@
#include "../handle/nonehandle.h" #include "../handle/nonehandle.h"
#include <winpr/thread.h> #include <winpr/thread.h>
#include <winpr/wlog.h>
/** /**
* CreateProcessA * CreateProcessA
@ -150,11 +151,13 @@ static char* FindApplicationPath(char* application)
static HANDLE CreateProcessHandle(pid_t pid); static HANDLE CreateProcessHandle(pid_t pid);
static BOOL ProcessHandleCloseHandle(HANDLE handle); static BOOL ProcessHandleCloseHandle(HANDLE handle);
static BOOL CreateProcessExA(HANDLE hToken, DWORD dwLogonFlags, LPCSTR lpApplicationName, static BOOL CreateProcessExA(HANDLE hToken, WINPR_ATTR_UNUSED DWORD dwLogonFlags,
LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPCSTR lpApplicationName, WINPR_ATTR_UNUSED LPSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpProcessAttributes,
DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpThreadAttributes,
LPSTARTUPINFOA lpStartupInfo, WINPR_ATTR_UNUSED BOOL bInheritHandles,
WINPR_ATTR_UNUSED DWORD dwCreationFlags, LPVOID lpEnvironment,
LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation) LPPROCESS_INFORMATION lpProcessInformation)
{ {
pid_t pid = 0; pid_t pid = 0;
@ -377,12 +380,17 @@ BOOL CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine,
lpCurrentDirectory, lpStartupInfo, lpProcessInformation); lpCurrentDirectory, lpStartupInfo, lpProcessInformation);
} }
BOOL CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, BOOL CreateProcessW(WINPR_ATTR_UNUSED LPCWSTR lpApplicationName,
LPSECURITY_ATTRIBUTES lpProcessAttributes, WINPR_ATTR_UNUSED LPWSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpProcessAttributes,
DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpThreadAttributes,
LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation) WINPR_ATTR_UNUSED BOOL bInheritHandles, WINPR_ATTR_UNUSED DWORD dwCreationFlags,
WINPR_ATTR_UNUSED LPVOID lpEnvironment,
WINPR_ATTR_UNUSED LPCWSTR lpCurrentDirectory,
WINPR_ATTR_UNUSED LPSTARTUPINFOW lpStartupInfo,
WINPR_ATTR_UNUSED LPPROCESS_INFORMATION lpProcessInformation)
{ {
WLog_ERR("TODO", "TODO: implement");
return FALSE; return FALSE;
} }
@ -397,48 +405,67 @@ BOOL CreateProcessAsUserA(HANDLE hToken, LPCSTR lpApplicationName, LPSTR lpComma
lpCurrentDirectory, lpStartupInfo, lpProcessInformation); lpCurrentDirectory, lpStartupInfo, lpProcessInformation);
} }
BOOL CreateProcessAsUserW(HANDLE hToken, LPCWSTR lpApplicationName, LPWSTR lpCommandLine, BOOL CreateProcessAsUserW(WINPR_ATTR_UNUSED HANDLE hToken,
LPSECURITY_ATTRIBUTES lpProcessAttributes, WINPR_ATTR_UNUSED LPCWSTR lpApplicationName,
LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, WINPR_ATTR_UNUSED LPWSTR lpCommandLine,
DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation) WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpThreadAttributes,
WINPR_ATTR_UNUSED BOOL bInheritHandles,
WINPR_ATTR_UNUSED DWORD dwCreationFlags,
WINPR_ATTR_UNUSED LPVOID lpEnvironment,
WINPR_ATTR_UNUSED LPCWSTR lpCurrentDirectory,
WINPR_ATTR_UNUSED LPSTARTUPINFOW lpStartupInfo,
WINPR_ATTR_UNUSED LPPROCESS_INFORMATION lpProcessInformation)
{ {
WLog_ERR("TODO", "TODO: implement");
return FALSE; return FALSE;
} }
BOOL CreateProcessWithLogonA(LPCSTR lpUsername, LPCSTR lpDomain, LPCSTR lpPassword, BOOL CreateProcessWithLogonA(
DWORD dwLogonFlags, LPCSTR lpApplicationName, LPSTR lpCommandLine, WINPR_ATTR_UNUSED LPCSTR lpUsername, WINPR_ATTR_UNUSED LPCSTR lpDomain,
DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, WINPR_ATTR_UNUSED LPCSTR lpPassword, WINPR_ATTR_UNUSED DWORD dwLogonFlags,
WINPR_ATTR_UNUSED LPCSTR lpApplicationName, WINPR_ATTR_UNUSED LPSTR lpCommandLine,
WINPR_ATTR_UNUSED DWORD dwCreationFlags, WINPR_ATTR_UNUSED LPVOID lpEnvironment,
WINPR_ATTR_UNUSED LPCSTR lpCurrentDirectory, WINPR_ATTR_UNUSED LPSTARTUPINFOA lpStartupInfo,
WINPR_ATTR_UNUSED LPPROCESS_INFORMATION lpProcessInformation)
{
WLog_ERR("TODO", "TODO: implement");
return FALSE;
}
BOOL CreateProcessWithLogonW(
WINPR_ATTR_UNUSED LPCWSTR lpUsername, WINPR_ATTR_UNUSED LPCWSTR lpDomain,
WINPR_ATTR_UNUSED LPCWSTR lpPassword, WINPR_ATTR_UNUSED DWORD dwLogonFlags,
WINPR_ATTR_UNUSED LPCWSTR lpApplicationName, WINPR_ATTR_UNUSED LPWSTR lpCommandLine,
WINPR_ATTR_UNUSED DWORD dwCreationFlags, WINPR_ATTR_UNUSED LPVOID lpEnvironment,
WINPR_ATTR_UNUSED LPCWSTR lpCurrentDirectory, WINPR_ATTR_UNUSED LPSTARTUPINFOW lpStartupInfo,
WINPR_ATTR_UNUSED LPPROCESS_INFORMATION lpProcessInformation)
{
WLog_ERR("TODO", "TODO: implement");
return FALSE;
}
BOOL CreateProcessWithTokenA(WINPR_ATTR_UNUSED HANDLE hToken, WINPR_ATTR_UNUSED DWORD dwLogonFlags,
LPCSTR lpApplicationName, LPSTR lpCommandLine, DWORD dwCreationFlags,
LPVOID lpEnvironment, LPCSTR lpCurrentDirectory,
LPSTARTUPINFOA lpStartupInfo, LPSTARTUPINFOA lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation) LPPROCESS_INFORMATION lpProcessInformation)
{
return FALSE;
}
BOOL CreateProcessWithLogonW(LPCWSTR lpUsername, LPCWSTR lpDomain, LPCWSTR lpPassword,
DWORD dwLogonFlags, LPCWSTR lpApplicationName, LPWSTR lpCommandLine,
DWORD dwCreationFlags, LPVOID lpEnvironment,
LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation)
{
return FALSE;
}
BOOL CreateProcessWithTokenA(HANDLE hToken, DWORD dwLogonFlags, LPCSTR lpApplicationName,
LPSTR lpCommandLine, DWORD dwCreationFlags, LPVOID lpEnvironment,
LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation)
{ {
return CreateProcessExA(NULL, 0, lpApplicationName, lpCommandLine, NULL, NULL, FALSE, return CreateProcessExA(NULL, 0, lpApplicationName, lpCommandLine, NULL, NULL, FALSE,
dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo,
lpProcessInformation); lpProcessInformation);
} }
BOOL CreateProcessWithTokenW(HANDLE hToken, DWORD dwLogonFlags, LPCWSTR lpApplicationName, BOOL CreateProcessWithTokenW(WINPR_ATTR_UNUSED HANDLE hToken, WINPR_ATTR_UNUSED DWORD dwLogonFlags,
LPWSTR lpCommandLine, DWORD dwCreationFlags, LPVOID lpEnvironment, WINPR_ATTR_UNUSED LPCWSTR lpApplicationName,
LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, WINPR_ATTR_UNUSED LPWSTR lpCommandLine,
LPPROCESS_INFORMATION lpProcessInformation) WINPR_ATTR_UNUSED DWORD dwCreationFlags,
WINPR_ATTR_UNUSED LPVOID lpEnvironment,
WINPR_ATTR_UNUSED LPCWSTR lpCurrentDirectory,
WINPR_ATTR_UNUSED LPSTARTUPINFOW lpStartupInfo,
WINPR_ATTR_UNUSED LPPROCESS_INFORMATION lpProcessInformation)
{ {
WLog_ERR("TODO", "TODO: implement");
return FALSE; return FALSE;
} }
@ -465,15 +492,17 @@ BOOL GetExitCodeProcess(HANDLE hProcess, LPDWORD lpExitCode)
HANDLE _GetCurrentProcess(VOID) HANDLE _GetCurrentProcess(VOID)
{ {
WLog_ERR("TODO", "TODO: implement");
return NULL; return NULL;
} }
DWORD GetCurrentProcessId(VOID) DWORD GetCurrentProcessId(VOID)
{ {
WLog_ERR("TODO", "TODO: implement");
return ((DWORD)getpid()); return ((DWORD)getpid());
} }
BOOL TerminateProcess(HANDLE hProcess, UINT uExitCode) BOOL TerminateProcess(HANDLE hProcess, WINPR_ATTR_UNUSED UINT uExitCode)
{ {
WINPR_PROCESS* process = NULL; WINPR_PROCESS* process = NULL;
process = (WINPR_PROCESS*)hProcess; process = (WINPR_PROCESS*)hProcess;

View File

@ -440,7 +440,8 @@ static INIT_ONCE threads_InitOnce = INIT_ONCE_STATIC_INIT;
static pthread_t mainThreadId; static pthread_t mainThreadId;
static DWORD currentThreadTlsIndex = TLS_OUT_OF_INDEXES; static DWORD currentThreadTlsIndex = TLS_OUT_OF_INDEXES;
static BOOL initializeThreads(PINIT_ONCE InitOnce, PVOID Parameter, PVOID* Context) static BOOL initializeThreads(WINPR_ATTR_UNUSED PINIT_ONCE InitOnce,
WINPR_ATTR_UNUSED PVOID Parameter, WINPR_ATTR_UNUSED PVOID* Context)
{ {
if (!apc_init(&mainThread.apc)) if (!apc_init(&mainThread.apc))
{ {
@ -680,7 +681,7 @@ BOOL SetThreadPriority(HANDLE hThread, int nPriority)
HANDLE CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, size_t dwStackSize, HANDLE CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, size_t dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter,
DWORD dwCreationFlags, LPDWORD lpThreadId) DWORD dwCreationFlags, WINPR_ATTR_UNUSED LPDWORD lpThreadId)
{ {
HANDLE handle = NULL; HANDLE handle = NULL;
WINPR_THREAD* thread = (WINPR_THREAD*)calloc(1, sizeof(WINPR_THREAD)); WINPR_THREAD* thread = (WINPR_THREAD*)calloc(1, sizeof(WINPR_THREAD));
@ -813,9 +814,13 @@ BOOL ThreadCloseHandle(HANDLE handle)
return TRUE; return TRUE;
} }
HANDLE CreateRemoteThread(HANDLE hProcess, LPSECURITY_ATTRIBUTES lpThreadAttributes, HANDLE CreateRemoteThread(WINPR_ATTR_UNUSED HANDLE hProcess,
size_t dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpThreadAttributes,
LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId) WINPR_ATTR_UNUSED size_t dwStackSize,
WINPR_ATTR_UNUSED LPTHREAD_START_ROUTINE lpStartAddress,
WINPR_ATTR_UNUSED LPVOID lpParameter,
WINPR_ATTR_UNUSED DWORD dwCreationFlags,
WINPR_ATTR_UNUSED LPDWORD lpThreadId)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -1000,7 +1005,7 @@ DWORD ResumeThread(HANDLE hThread)
return 0; return 0;
} }
DWORD SuspendThread(HANDLE hThread) DWORD SuspendThread(WINPR_ATTR_UNUSED HANDLE hThread)
{ {
WLog_ERR(TAG, "not implemented"); WLog_ERR(TAG, "not implemented");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View File

@ -398,7 +398,7 @@ static const char* map_fallback(const char* iana, TimeZoneNameType type)
return res; return res;
} }
#else #else
static const char* map_fallback(const char* iana, TimeZoneNameType type) static const char* map_fallback(const char* iana, WINPR_ATTR_UNUSED TimeZoneNameType type)
{ {
if (!iana) if (!iana)
return NULL; return NULL;

View File

@ -389,10 +389,13 @@ int CommandLineParseArgumentsA(int argc, LPSTR* argv, COMMAND_LINE_ARGUMENT_A* o
return status; return status;
} }
int CommandLineParseArgumentsW(int argc, LPWSTR* argv, COMMAND_LINE_ARGUMENT_W* options, int CommandLineParseArgumentsW(WINPR_ATTR_UNUSED int argc, WINPR_ATTR_UNUSED LPWSTR* argv,
DWORD flags, void* context, COMMAND_LINE_PRE_FILTER_FN_W preFilter, WINPR_ATTR_UNUSED COMMAND_LINE_ARGUMENT_W* options,
COMMAND_LINE_POST_FILTER_FN_W postFilter) WINPR_ATTR_UNUSED DWORD flags, WINPR_ATTR_UNUSED void* context,
WINPR_ATTR_UNUSED COMMAND_LINE_PRE_FILTER_FN_W preFilter,
WINPR_ATTR_UNUSED COMMAND_LINE_POST_FILTER_FN_W postFilter)
{ {
WLog_ERR("TODO", "TODO: implement");
return 0; return 0;
} }

View File

@ -86,7 +86,7 @@ size_t ArrayList_Items(wArrayList* arrayList, ULONG_PTR** ppItems)
* Gets a value indicating whether the ArrayList has a fixed size. * Gets a value indicating whether the ArrayList has a fixed size.
*/ */
BOOL ArrayList_IsFixedSized(wArrayList* arrayList) BOOL ArrayList_IsFixedSized(WINPR_ATTR_UNUSED wArrayList* arrayList)
{ {
WINPR_ASSERT(arrayList); WINPR_ASSERT(arrayList);
return FALSE; return FALSE;
@ -96,7 +96,7 @@ BOOL ArrayList_IsFixedSized(wArrayList* arrayList)
* Gets a value indicating whether the ArrayList is read-only. * Gets a value indicating whether the ArrayList is read-only.
*/ */
BOOL ArrayList_IsReadOnly(wArrayList* arrayList) BOOL ArrayList_IsReadOnly(WINPR_ATTR_UNUSED wArrayList* arrayList)
{ {
WINPR_ASSERT(arrayList); WINPR_ASSERT(arrayList);
return FALSE; return FALSE;

View File

@ -205,7 +205,7 @@ void winpr_log_backtrace(const char* tag, DWORD level, DWORD size)
winpr_log_backtrace_ex(WLog_Get(tag), level, size); winpr_log_backtrace_ex(WLog_Get(tag), level, size);
} }
void winpr_log_backtrace_ex(wLog* log, DWORD level, DWORD size) void winpr_log_backtrace_ex(wLog* log, DWORD level, WINPR_ATTR_UNUSED DWORD size)
{ {
size_t used = 0; size_t used = 0;
char** msg = NULL; char** msg = NULL;

View File

@ -26,6 +26,7 @@
#include <winpr/wtypes.h> #include <winpr/wtypes.h>
#include <winpr/crt.h> #include <winpr/crt.h>
#include <winpr/file.h> #include <winpr/file.h>
#include <winpr/cast.h>
#include <winpr/image.h> #include <winpr/image.h>
@ -245,7 +246,7 @@ BYTE* winpr_bitmap_construct_header(size_t width, size_t height, size_t bpp)
offset += sizeof(DWORD) * 3; // 3 DWORD color masks offset += sizeof(DWORD) * 3; // 3 DWORD color masks
break; break;
default: default:
return FALSE; return NULL;
} }
if (!writeBitmapFileHeader(s, &bf)) if (!writeBitmapFileHeader(s, &bf))
@ -269,8 +270,9 @@ fail:
*/ */
WINPR_ATTR_MALLOC(free, 1) WINPR_ATTR_MALLOC(free, 1)
static void* winpr_bitmap_write_buffer(const BYTE* data, size_t size, UINT32 width, UINT32 height, static void* winpr_bitmap_write_buffer(const BYTE* data, WINPR_ATTR_UNUSED size_t size,
UINT32 stride, UINT32 bpp, UINT32* pSize) UINT32 width, UINT32 height, UINT32 stride, UINT32 bpp,
UINT32* pSize)
{ {
WINPR_ASSERT(data || (size == 0)); WINPR_ASSERT(data || (size == 0));
@ -611,8 +613,10 @@ void winpr_image_free(wImage* image, BOOL bFreeBuffer)
free(image); free(image);
} }
static void* winpr_convert_to_jpeg(const void* data, size_t size, UINT32 width, UINT32 height, static void* winpr_convert_to_jpeg(WINPR_ATTR_UNUSED const void* data,
UINT32 stride, UINT32 bpp, UINT32* pSize) WINPR_ATTR_UNUSED size_t size, WINPR_ATTR_UNUSED UINT32 width,
WINPR_ATTR_UNUSED UINT32 height, WINPR_ATTR_UNUSED UINT32 stride,
WINPR_ATTR_UNUSED UINT32 bpp, WINPR_ATTR_UNUSED UINT32* pSize)
{ {
WINPR_ASSERT(data || (size == 0)); WINPR_ASSERT(data || (size == 0));
WINPR_ASSERT(pSize); WINPR_ASSERT(pSize);
@ -679,8 +683,11 @@ fail:
} }
// NOLINTBEGIN(readability-non-const-parameter) // NOLINTBEGIN(readability-non-const-parameter)
SSIZE_T winpr_convert_from_jpeg(const BYTE* comp_data, size_t comp_data_bytes, UINT32* width, SSIZE_T winpr_convert_from_jpeg(WINPR_ATTR_UNUSED const BYTE* comp_data,
UINT32* height, UINT32* bpp, BYTE** ppdecomp_data) WINPR_ATTR_UNUSED size_t comp_data_bytes,
WINPR_ATTR_UNUSED UINT32* width, WINPR_ATTR_UNUSED UINT32* height,
WINPR_ATTR_UNUSED UINT32* bpp,
WINPR_ATTR_UNUSED BYTE** ppdecomp_data)
// NOLINTEND(readability-non-const-parameter) // NOLINTEND(readability-non-const-parameter)
{ {
WINPR_ASSERT(comp_data || (comp_data_bytes == 0)); WINPR_ASSERT(comp_data || (comp_data_bytes == 0));
@ -706,14 +713,15 @@ SSIZE_T winpr_convert_from_jpeg(const BYTE* comp_data, size_t comp_data_bytes, U
cinfo.out_color_space = cinfo.num_components > 3 ? JCS_EXT_RGBA : JCS_EXT_BGR; cinfo.out_color_space = cinfo.num_components > 3 ? JCS_EXT_RGBA : JCS_EXT_BGR;
*width = cinfo.image_width; *width = WINPR_ASSERTING_INT_CAST(uint32_t, cinfo.image_width);
*height = cinfo.image_height; *height = WINPR_ASSERTING_INT_CAST(uint32_t, cinfo.image_height);
*bpp = cinfo.num_components * 8; *bpp = WINPR_ASSERTING_INT_CAST(uint32_t, cinfo.num_components * 8);
if (!jpeg_start_decompress(&cinfo)) if (!jpeg_start_decompress(&cinfo))
goto fail; goto fail;
size_t stride = 1ULL * cinfo.image_width * cinfo.num_components; size_t stride =
1ULL * cinfo.image_width * WINPR_ASSERTING_INT_CAST(uint32_t, cinfo.num_components);
if ((stride == 0) || (cinfo.image_height == 0)) if ((stride == 0) || (cinfo.image_height == 0))
goto fail; goto fail;
@ -740,8 +748,10 @@ fail:
#endif #endif
} }
static void* winpr_convert_to_webp(const void* data, size_t size, UINT32 width, UINT32 height, static void* winpr_convert_to_webp(WINPR_ATTR_UNUSED const void* data,
UINT32 stride, UINT32 bpp, UINT32* pSize) WINPR_ATTR_UNUSED size_t size, WINPR_ATTR_UNUSED UINT32 width,
WINPR_ATTR_UNUSED UINT32 height, WINPR_ATTR_UNUSED UINT32 stride,
WINPR_ATTR_UNUSED UINT32 bpp, UINT32* pSize)
{ {
WINPR_ASSERT(data || (size == 0)); WINPR_ASSERT(data || (size == 0));
WINPR_ASSERT(pSize); WINPR_ASSERT(pSize);
@ -781,7 +791,8 @@ static void* winpr_convert_to_webp(const void* data, size_t size, UINT32 width,
#endif #endif
} }
SSIZE_T winpr_convert_from_webp(const BYTE* comp_data, size_t comp_data_bytes, UINT32* width, SSIZE_T winpr_convert_from_webp(WINPR_ATTR_UNUSED const BYTE* comp_data,
WINPR_ATTR_UNUSED size_t comp_data_bytes, UINT32* width,
UINT32* height, UINT32* bpp, BYTE** ppdecomp_data) UINT32* height, UINT32* bpp, BYTE** ppdecomp_data)
{ {
WINPR_ASSERT(comp_data || (comp_data_bytes == 0)); WINPR_ASSERT(comp_data || (comp_data_bytes == 0));
@ -807,8 +818,8 @@ SSIZE_T winpr_convert_from_webp(const BYTE* comp_data, size_t comp_data_bytes, U
return -1; return -1;
} }
*width = w; *width = WINPR_ASSERTING_INT_CAST(uint32_t, w);
*height = h; *height = WINPR_ASSERTING_INT_CAST(uint32_t, h);
*bpp = 32; *bpp = 32;
*ppdecomp_data = dst; *ppdecomp_data = dst;
return 4ll * w * h; return 4ll * w * h;
@ -848,7 +859,7 @@ static void png_write_data(png_structp png_ptr, png_bytep data, png_size_t lengt
} }
/* This is optional but included to show how png_set_write_fn() is called */ /* This is optional but included to show how png_set_write_fn() is called */
static void png_flush(png_structp png_ptr) static void png_flush(WINPR_ATTR_UNUSED png_structp png_ptr)
{ {
} }
@ -1030,8 +1041,10 @@ fail:
} }
#endif #endif
static void* winpr_convert_to_png(const void* data, size_t size, UINT32 width, UINT32 height, static void* winpr_convert_to_png(WINPR_ATTR_UNUSED const void* data, WINPR_ATTR_UNUSED size_t size,
UINT32 stride, UINT32 bpp, UINT32* pSize) WINPR_ATTR_UNUSED UINT32 width, WINPR_ATTR_UNUSED UINT32 height,
WINPR_ATTR_UNUSED UINT32 stride, WINPR_ATTR_UNUSED UINT32 bpp,
UINT32* pSize)
{ {
WINPR_ASSERT(data || (size == 0)); WINPR_ASSERT(data || (size == 0));
WINPR_ASSERT(pSize); WINPR_ASSERT(pSize);
@ -1072,8 +1085,11 @@ static void* winpr_convert_to_png(const void* data, size_t size, UINT32 width, U
#endif #endif
} }
SSIZE_T winpr_convert_from_png(const BYTE* comp_data, size_t comp_data_bytes, UINT32* width, SSIZE_T winpr_convert_from_png(WINPR_ATTR_UNUSED const BYTE* comp_data,
UINT32* height, UINT32* bpp, BYTE** ppdecomp_data) WINPR_ATTR_UNUSED size_t comp_data_bytes,
WINPR_ATTR_UNUSED UINT32* width, WINPR_ATTR_UNUSED UINT32* height,
WINPR_ATTR_UNUSED UINT32* bpp,
WINPR_ATTR_UNUSED BYTE** ppdecomp_data)
{ {
#if defined(WINPR_UTILS_IMAGE_PNG) #if defined(WINPR_UTILS_IMAGE_PNG)
size_t len = 0; size_t len = 0;
@ -1111,7 +1127,7 @@ BOOL winpr_image_format_is_supported(UINT32 format)
} }
} }
static BYTE* convert(const wImage* image, size_t* pstride, UINT32 flags) static BYTE* convert(const wImage* image, size_t* pstride, WINPR_ATTR_UNUSED UINT32 flags)
{ {
WINPR_ASSERT(image); WINPR_ASSERT(image);
WINPR_ASSERT(pstride); WINPR_ASSERT(pstride);

View File

@ -139,7 +139,7 @@ static FILE* IniFile_Open_File(wIniFile* ini, const char* filename)
WINPR_ASSERT(ini); WINPR_ASSERT(ini);
if (!filename) if (!filename)
return FALSE; return NULL;
if (ini->readOnly) if (ini->readOnly)
return winpr_fopen(filename, "rb"); return winpr_fopen(filename, "rb");

View File

@ -253,7 +253,7 @@ static BOOL SamReadEntry(WINPR_SAM* sam, WINPR_SAM_ENTRY* entry)
return TRUE; return TRUE;
} }
void SamFreeEntry(WINPR_SAM* sam, WINPR_SAM_ENTRY* entry) void SamFreeEntry(WINPR_ATTR_UNUSED WINPR_SAM* sam, WINPR_SAM_ENTRY* entry)
{ {
if (entry) if (entry)
{ {

View File

@ -286,7 +286,8 @@ static void winpr_openssl_cleanup(void)
winpr_CleanupSSL(WINPR_SSL_INIT_DEFAULT); winpr_CleanupSSL(WINPR_SSL_INIT_DEFAULT);
} }
static BOOL CALLBACK winpr_openssl_initialize(PINIT_ONCE once, PVOID param, PVOID* context) static BOOL CALLBACK winpr_openssl_initialize(WINPR_ATTR_UNUSED PINIT_ONCE once, PVOID param,
WINPR_ATTR_UNUSED PVOID* context)
{ {
DWORD flags = param ? *(PDWORD)param : WINPR_SSL_INIT_DEFAULT; DWORD flags = param ? *(PDWORD)param : WINPR_SSL_INIT_DEFAULT;
@ -355,7 +356,7 @@ BOOL winpr_InitializeSSL(DWORD flags)
} }
#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
static int unload(OSSL_PROVIDER* provider, void* data) static int unload(OSSL_PROVIDER* provider, WINPR_ATTR_UNUSED void* data)
{ {
if (!provider) if (!provider)
return 1; return 1;

View File

@ -84,7 +84,7 @@ static BOOL WLog_BinaryAppender_Open(wLog* log, wLogAppender* appender)
return TRUE; return TRUE;
} }
static BOOL WLog_BinaryAppender_Close(wLog* log, wLogAppender* appender) static BOOL WLog_BinaryAppender_Close(WINPR_ATTR_UNUSED wLog* log, wLogAppender* appender)
{ {
wLogBinaryAppender* binaryAppender = NULL; wLogBinaryAppender* binaryAppender = NULL;
@ -167,14 +167,16 @@ static BOOL WLog_BinaryAppender_WriteMessage(wLog* log, wLogAppender* appender,
return ret; return ret;
} }
static BOOL WLog_BinaryAppender_WriteDataMessage(wLog* log, wLogAppender* appender, static BOOL WLog_BinaryAppender_WriteDataMessage(WINPR_ATTR_UNUSED wLog* log,
wLogMessage* message) WINPR_ATTR_UNUSED wLogAppender* appender,
WINPR_ATTR_UNUSED wLogMessage* message)
{ {
return TRUE; return TRUE;
} }
static BOOL WLog_BinaryAppender_WriteImageMessage(wLog* log, wLogAppender* appender, static BOOL WLog_BinaryAppender_WriteImageMessage(WINPR_ATTR_UNUSED wLog* log,
wLogMessage* message) WINPR_ATTR_UNUSED wLogAppender* appender,
WINPR_ATTR_UNUSED wLogMessage* message)
{ {
return TRUE; return TRUE;
} }
@ -218,7 +220,7 @@ static void WLog_BinaryAppender_Free(wLogAppender* appender)
} }
} }
wLogAppender* WLog_BinaryAppender_New(wLog* log) wLogAppender* WLog_BinaryAppender_New(WINPR_ATTR_UNUSED wLog* log)
{ {
wLogBinaryAppender* BinaryAppender = NULL; wLogBinaryAppender* BinaryAppender = NULL;

View File

@ -28,12 +28,14 @@ typedef struct
wLogCallbacks* callbacks; wLogCallbacks* callbacks;
} wLogCallbackAppender; } wLogCallbackAppender;
static BOOL WLog_CallbackAppender_Open(wLog* log, wLogAppender* appender) static BOOL WLog_CallbackAppender_Open(WINPR_ATTR_UNUSED wLog* log,
WINPR_ATTR_UNUSED wLogAppender* appender)
{ {
return TRUE; return TRUE;
} }
static BOOL WLog_CallbackAppender_Close(wLog* log, wLogAppender* appender) static BOOL WLog_CallbackAppender_Close(WINPR_ATTR_UNUSED wLog* log,
WINPR_ATTR_UNUSED wLogAppender* appender)
{ {
return TRUE; return TRUE;
} }
@ -145,7 +147,7 @@ static void WLog_CallbackAppender_Free(wLogAppender* appender)
free(appender); free(appender);
} }
wLogAppender* WLog_CallbackAppender_New(wLog* log) wLogAppender* WLog_CallbackAppender_New(WINPR_ATTR_UNUSED wLog* log)
{ {
wLogCallbackAppender* CallbackAppender = NULL; wLogCallbackAppender* CallbackAppender = NULL;

View File

@ -38,12 +38,14 @@ typedef struct
int outputStream; int outputStream;
} wLogConsoleAppender; } wLogConsoleAppender;
static BOOL WLog_ConsoleAppender_Open(wLog* log, wLogAppender* appender) static BOOL WLog_ConsoleAppender_Open(WINPR_ATTR_UNUSED wLog* log,
WINPR_ATTR_UNUSED wLogAppender* appender)
{ {
return TRUE; return TRUE;
} }
static BOOL WLog_ConsoleAppender_Close(wLog* log, wLogAppender* appender) static BOOL WLog_ConsoleAppender_Close(WINPR_ATTR_UNUSED wLog* log,
WINPR_ATTR_UNUSED wLogAppender* appender)
{ {
return TRUE; return TRUE;
} }
@ -138,7 +140,8 @@ static BOOL WLog_ConsoleAppender_WriteMessage(wLog* log, wLogAppender* appender,
static int g_DataId = 0; static int g_DataId = 0;
static BOOL WLog_ConsoleAppender_WriteDataMessage(wLog* log, wLogAppender* appender, static BOOL WLog_ConsoleAppender_WriteDataMessage(WINPR_ATTR_UNUSED wLog* log,
WINPR_ATTR_UNUSED wLogAppender* appender,
wLogMessage* message) wLogMessage* message)
{ {
#if defined(ANDROID) #if defined(ANDROID)
@ -160,7 +163,8 @@ static BOOL WLog_ConsoleAppender_WriteDataMessage(wLog* log, wLogAppender* appen
static int g_ImageId = 0; static int g_ImageId = 0;
static BOOL WLog_ConsoleAppender_WriteImageMessage(wLog* log, wLogAppender* appender, static BOOL WLog_ConsoleAppender_WriteImageMessage(WINPR_ATTR_UNUSED wLog* log,
WINPR_ATTR_UNUSED wLogAppender* appender,
wLogMessage* message) wLogMessage* message)
{ {
#if defined(ANDROID) #if defined(ANDROID)
@ -183,8 +187,8 @@ static BOOL WLog_ConsoleAppender_WriteImageMessage(wLog* log, wLogAppender* appe
static int g_PacketId = 0; static int g_PacketId = 0;
static BOOL WLog_ConsoleAppender_WritePacketMessage(wLog* log, wLogAppender* appender, static BOOL WLog_ConsoleAppender_WritePacketMessage(WINPR_ATTR_UNUSED wLog* log,
wLogMessage* message) wLogAppender* appender, wLogMessage* message)
{ {
#if defined(ANDROID) #if defined(ANDROID)
return FALSE; return FALSE;
@ -245,7 +249,7 @@ static void WLog_ConsoleAppender_Free(wLogAppender* appender)
} }
} }
wLogAppender* WLog_ConsoleAppender_New(wLog* log) wLogAppender* WLog_ConsoleAppender_New(WINPR_ATTR_UNUSED wLog* log)
{ {
wLogConsoleAppender* ConsoleAppender = NULL; wLogConsoleAppender* ConsoleAppender = NULL;

View File

@ -216,7 +216,7 @@ static void WLog_FileAppender_Free(wLogAppender* appender)
} }
} }
wLogAppender* WLog_FileAppender_New(wLog* log) wLogAppender* WLog_FileAppender_New(WINPR_ATTR_UNUSED wLog* log)
{ {
LPSTR env = NULL; LPSTR env = NULL;
LPCSTR name = NULL; LPCSTR name = NULL;

View File

@ -76,7 +76,7 @@ struct format_option_recurse
* Log Layout * Log Layout
*/ */
WINPR_ATTR_FORMAT_ARG(3, 0) WINPR_ATTR_FORMAT_ARG(3, 0)
static void WLog_PrintMessagePrefixVA(wLog* log, wLogMessage* message, static void WLog_PrintMessagePrefixVA(WINPR_ATTR_UNUSED wLog* log, wLogMessage* message,
WINPR_FORMAT_ARG const char* format, va_list args) WINPR_FORMAT_ARG const char* format, va_list args)
{ {
WINPR_ASSERT(message); WINPR_ASSERT(message);
@ -306,7 +306,8 @@ wLogLayout* WLog_GetLogLayout(wLog* log)
return appender->Layout; return appender->Layout;
} }
BOOL WLog_Layout_SetPrefixFormat(wLog* log, wLogLayout* layout, const char* format) BOOL WLog_Layout_SetPrefixFormat(WINPR_ATTR_UNUSED wLog* log, wLogLayout* layout,
const char* format)
{ {
free(layout->FormatString); free(layout->FormatString);
layout->FormatString = NULL; layout->FormatString = NULL;
@ -322,7 +323,7 @@ BOOL WLog_Layout_SetPrefixFormat(wLog* log, wLogLayout* layout, const char* form
return TRUE; return TRUE;
} }
wLogLayout* WLog_Layout_New(wLog* log) wLogLayout* WLog_Layout_New(WINPR_ATTR_UNUSED wLog* log)
{ {
LPCSTR prefix = "WLOG_PREFIX"; LPCSTR prefix = "WLOG_PREFIX";
DWORD nSize = 0; DWORD nSize = 0;
@ -374,7 +375,7 @@ wLogLayout* WLog_Layout_New(wLog* log)
return layout; return layout;
} }
void WLog_Layout_Free(wLog* log, wLogLayout* layout) void WLog_Layout_Free(WINPR_ATTR_UNUSED wLog* log, wLogLayout* layout)
{ {
if (layout) if (layout)
{ {

View File

@ -116,7 +116,7 @@ static void WLog_SyslogAppender_Free(wLogAppender* appender)
free(appender); free(appender);
} }
wLogAppender* WLog_SyslogAppender_New(wLog* log) wLogAppender* WLog_SyslogAppender_New(WINPR_ATTR_UNUSED wLog* log)
{ {
wLogSyslogAppender* appender = NULL; wLogSyslogAppender* appender = NULL;

View File

@ -35,7 +35,7 @@ typedef struct
SOCKET sock; SOCKET sock;
} wLogUdpAppender; } wLogUdpAppender;
static BOOL WLog_UdpAppender_Open(wLog* log, wLogAppender* appender) static BOOL WLog_UdpAppender_Open(WINPR_ATTR_UNUSED wLog* log, wLogAppender* appender)
{ {
wLogUdpAppender* udpAppender = NULL; wLogUdpAppender* udpAppender = NULL;
char addressString[256] = { 0 }; char addressString[256] = { 0 };

View File

@ -730,7 +730,7 @@ BOOL WSASetEvent(HANDLE hEvent)
return SetEvent(hEvent); return SetEvent(hEvent);
} }
BOOL WSAResetEvent(HANDLE hEvent) BOOL WSAResetEvent(WINPR_ATTR_UNUSED HANDLE hEvent)
{ {
/* POSIX systems auto reset the socket, /* POSIX systems auto reset the socket,
* if no more data is available. */ * if no more data is available. */
@ -776,8 +776,9 @@ DWORD WSAWaitForMultipleEvents(DWORD cEvents, const HANDLE* lphEvents, BOOL fWai
return WaitForMultipleObjectsEx(cEvents, lphEvents, fWaitAll, dwTimeout, fAlertable); return WaitForMultipleObjectsEx(cEvents, lphEvents, fWaitAll, dwTimeout, fAlertable);
} }
SOCKET WSASocketA(int af, int type, int protocol, LPWSAPROTOCOL_INFOA lpProtocolInfo, GROUP g, SOCKET WSASocketA(int af, int type, int protocol,
DWORD dwFlags) WINPR_ATTR_UNUSED LPWSAPROTOCOL_INFOA lpProtocolInfo, WINPR_ATTR_UNUSED GROUP g,
WINPR_ATTR_UNUSED DWORD dwFlags)
{ {
SOCKET s = 0; SOCKET s = 0;
s = _socket(af, type, protocol); s = _socket(af, type, protocol);
@ -790,9 +791,10 @@ SOCKET WSASocketW(int af, int type, int protocol, LPWSAPROTOCOL_INFOW lpProtocol
return WSASocketA(af, type, protocol, (LPWSAPROTOCOL_INFOA)lpProtocolInfo, g, dwFlags); return WSASocketA(af, type, protocol, (LPWSAPROTOCOL_INFOA)lpProtocolInfo, g, dwFlags);
} }
int WSAIoctl(SOCKET s, DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbInBuffer, int WSAIoctl(SOCKET s, DWORD dwIoControlCode, WINPR_ATTR_UNUSED LPVOID lpvInBuffer,
LPVOID lpvOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbBytesReturned, WINPR_ATTR_UNUSED DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer,
LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) LPDWORD lpcbBytesReturned, WINPR_ATTR_UNUSED LPWSAOVERLAPPED lpOverlapped,
WINPR_ATTR_UNUSED LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
{ {
int fd = 0; int fd = 0;
int index = 0; int index = 0;