diff --git a/winpr/include/winpr/pool.h b/winpr/include/winpr/pool.h index da3aa90d4..ba38d0a96 100644 --- a/winpr/include/winpr/pool.h +++ b/winpr/include/winpr/pool.h @@ -254,7 +254,7 @@ extern "C" 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. */ } diff --git a/winpr/libwinpr/bcrypt/bcrypt.c b/winpr/libwinpr/bcrypt/bcrypt.c index 0ec86aca2..0642d242a 100644 --- a/winpr/libwinpr/bcrypt/bcrypt.c +++ b/winpr/libwinpr/bcrypt/bcrypt.c @@ -18,6 +18,7 @@ */ #include +#include #ifndef _WIN32 #include @@ -27,87 +28,126 @@ * http://msdn.microsoft.com/en-us/library/windows/desktop/aa376210/ */ -NTSTATUS BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE* phAlgorithm, LPCWSTR pszAlgId, - LPCWSTR pszImplementation, ULONG dwFlags) +NTSTATUS BCryptOpenAlgorithmProvider(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE* phAlgorithm, + WINPR_ATTR_UNUSED LPCWSTR pszAlgId, + WINPR_ATTR_UNUSED LPCWSTR pszImplementation, + WINPR_ATTR_UNUSED ULONG dwFlags) { + WLog_ERR("TODO", "TODO: implement"); 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; } -NTSTATUS BCryptGetProperty(BCRYPT_HANDLE hObject, LPCWSTR pszProperty, PUCHAR pbOutput, - ULONG cbOutput, ULONG* pcbResult, ULONG dwFlags) +NTSTATUS BCryptGetProperty(WINPR_ATTR_UNUSED BCRYPT_HANDLE hObject, + 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; } -NTSTATUS BCryptCreateHash(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_HASH_HANDLE* phHash, - PUCHAR pbHashObject, ULONG cbHashObject, PUCHAR pbSecret, ULONG cbSecret, - ULONG dwFlags) +NTSTATUS BCryptCreateHash(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm, + WINPR_ATTR_UNUSED BCRYPT_HASH_HANDLE* phHash, + 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; } -NTSTATUS BCryptDestroyHash(BCRYPT_HASH_HANDLE hHash) +NTSTATUS BCryptDestroyHash(WINPR_ATTR_UNUSED BCRYPT_HASH_HANDLE hHash) { + WLog_ERR("TODO", "TODO: implement"); 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; } -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; } -NTSTATUS BCryptGenRandom(BCRYPT_ALG_HANDLE hAlgorithm, PUCHAR pbBuffer, ULONG cbBuffer, - ULONG dwFlags) +NTSTATUS BCryptGenRandom(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm, + WINPR_ATTR_UNUSED PUCHAR pbBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer, + WINPR_ATTR_UNUSED ULONG dwFlags) { + WLog_ERR("TODO", "TODO: implement"); return 0; } -NTSTATUS BCryptGenerateSymmetricKey(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE* phKey, - PUCHAR pbKeyObject, ULONG cbKeyObject, PUCHAR pbSecret, - ULONG cbSecret, ULONG dwFlags) +NTSTATUS BCryptGenerateSymmetricKey(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm, + WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE* phKey, + 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; } -NTSTATUS BCryptGenerateKeyPair(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE* phKey, - ULONG dwLength, ULONG dwFlags) +NTSTATUS BCryptGenerateKeyPair(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm, + WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE* phKey, + WINPR_ATTR_UNUSED ULONG dwLength, WINPR_ATTR_UNUSED ULONG dwFlags) { + WLog_ERR("TODO", "TODO: implement"); return 0; } -NTSTATUS BCryptImportKey(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE hImportKey, - LPCWSTR pszBlobType, BCRYPT_KEY_HANDLE* phKey, PUCHAR pbKeyObject, - ULONG cbKeyObject, PUCHAR pbInput, ULONG cbInput, ULONG dwFlags) +NTSTATUS BCryptImportKey(WINPR_ATTR_UNUSED BCRYPT_ALG_HANDLE hAlgorithm, + WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE hImportKey, + 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; } -NTSTATUS BCryptDestroyKey(BCRYPT_KEY_HANDLE hKey) +NTSTATUS BCryptDestroyKey(WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE hKey) { + WLog_ERR("TODO", "TODO: implement"); return 0; } -NTSTATUS BCryptEncrypt(BCRYPT_KEY_HANDLE hKey, PUCHAR pbInput, ULONG cbInput, VOID* pPaddingInfo, - PUCHAR pbIV, ULONG cbIV, PUCHAR pbOutput, ULONG cbOutput, ULONG* pcbResult, - ULONG dwFlags) +NTSTATUS BCryptEncrypt(WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE hKey, WINPR_ATTR_UNUSED PUCHAR pbInput, + WINPR_ATTR_UNUSED ULONG cbInput, WINPR_ATTR_UNUSED VOID* pPaddingInfo, + 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; } -NTSTATUS BCryptDecrypt(BCRYPT_KEY_HANDLE hKey, PUCHAR pbInput, ULONG cbInput, VOID* pPaddingInfo, - PUCHAR pbIV, ULONG cbIV, PUCHAR pbOutput, ULONG cbOutput, ULONG* pcbResult, - ULONG dwFlags) +NTSTATUS BCryptDecrypt(WINPR_ATTR_UNUSED BCRYPT_KEY_HANDLE hKey, WINPR_ATTR_UNUSED PUCHAR pbInput, + WINPR_ATTR_UNUSED ULONG cbInput, WINPR_ATTR_UNUSED VOID* pPaddingInfo, + 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; } diff --git a/winpr/libwinpr/clipboard/synthetic.c b/winpr/libwinpr/clipboard/synthetic.c index 496462c7a..8db2c5801 100644 --- a/winpr/libwinpr/clipboard/synthetic.c +++ b/winpr/libwinpr/clipboard/synthetic.c @@ -108,8 +108,10 @@ static void* clipboard_synthesize_cf_oemtext(wClipboard* clipboard, UINT32 forma * System locale identifier associated with CF_TEXT */ -static void* clipboard_synthesize_cf_locale(wClipboard* clipboard, UINT32 formatId, - const void* data, UINT32* pSize) +static void* clipboard_synthesize_cf_locale(WINPR_ATTR_UNUSED wClipboard* clipboard, + WINPR_ATTR_UNUSED UINT32 formatId, + WINPR_ATTR_UNUSED const void* data, + WINPR_ATTR_UNUSED UINT32* pSize) { UINT32* pDstData = NULL; 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. */ -static void* clipboard_synthesize_cf_dibv5(wClipboard* clipboard, UINT32 formatId, const void* data, - UINT32* pSize) +static void* clipboard_synthesize_cf_dibv5(wClipboard* clipboard, UINT32 formatId, + WINPR_ATTR_UNUSED const void* data, + WINPR_ATTR_UNUSED UINT32* pSize) { if (formatId == CF_DIB) { @@ -325,8 +328,8 @@ fail: * Bitmap file format. */ -static void* clipboard_synthesize_image_bmp(wClipboard* clipboard, UINT32 formatId, - const void* data, UINT32* pSize) +static void* clipboard_synthesize_image_bmp(WINPR_ATTR_UNUSED wClipboard* clipboard, + UINT32 formatId, const void* data, UINT32* pSize) { UINT32 SrcSize = *pSize; @@ -402,7 +405,8 @@ static void* clipboard_synthesize_image_bmp_to_png(wClipboard* clipboard, UINT32 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) { WINPR_ASSERT(clipboard); diff --git a/winpr/libwinpr/clipboard/synthetic_file.c b/winpr/libwinpr/clipboard/synthetic_file.c index 915a126a2..8d8c60f63 100644 --- a/winpr/libwinpr/clipboard/synthetic_file.c +++ b/winpr/libwinpr/clipboard/synthetic_file.c @@ -536,7 +536,8 @@ error: 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) { FILEDESCRIPTORW* descriptors = NULL; @@ -1216,27 +1217,31 @@ static UINT delegate_file_request_range(wClipboardDelegate* delegate, return NO_ERROR; } -static UINT dummy_file_size_success(wClipboardDelegate* delegate, - const wClipboardFileSizeRequest* request, UINT64 fileSize) +static UINT dummy_file_size_success(WINPR_ATTR_UNUSED wClipboardDelegate* delegate, + WINPR_ATTR_UNUSED const wClipboardFileSizeRequest* request, + WINPR_ATTR_UNUSED UINT64 fileSize) { return ERROR_NOT_SUPPORTED; } -static UINT dummy_file_size_failure(wClipboardDelegate* delegate, - const wClipboardFileSizeRequest* request, UINT errorCode) +static UINT dummy_file_size_failure(WINPR_ATTR_UNUSED wClipboardDelegate* delegate, + WINPR_ATTR_UNUSED const wClipboardFileSizeRequest* request, + WINPR_ATTR_UNUSED UINT errorCode) { return ERROR_NOT_SUPPORTED; } -static UINT dummy_file_range_success(wClipboardDelegate* delegate, - const wClipboardFileRangeRequest* request, const BYTE* data, - UINT32 size) +static UINT dummy_file_range_success(WINPR_ATTR_UNUSED wClipboardDelegate* delegate, + WINPR_ATTR_UNUSED const wClipboardFileRangeRequest* request, + WINPR_ATTR_UNUSED const BYTE* data, + WINPR_ATTR_UNUSED UINT32 size) { return ERROR_NOT_SUPPORTED; } -static UINT dummy_file_range_failure(wClipboardDelegate* delegate, - const wClipboardFileRangeRequest* request, UINT errorCode) +static UINT dummy_file_range_failure(WINPR_ATTR_UNUSED wClipboardDelegate* delegate, + WINPR_ATTR_UNUSED const wClipboardFileRangeRequest* request, + WINPR_ATTR_UNUSED UINT errorCode) { return ERROR_NOT_SUPPORTED; } diff --git a/winpr/libwinpr/comm/comm.c b/winpr/libwinpr/comm/comm.c index f7115638e..e2186258e 100644 --- a/winpr/libwinpr/comm/comm.c +++ b/winpr/libwinpr/comm/comm.c @@ -206,7 +206,7 @@ void CommLog_Print(DWORD level, ...) va_end(ap); } -BOOL BuildCommDCBA(LPCSTR lpDef, LPDCB lpDCB) +BOOL BuildCommDCBA(WINPR_ATTR_UNUSED LPCSTR lpDef, WINPR_ATTR_UNUSED LPDCB lpDCB) { if (!CommInitialized()) return FALSE; @@ -217,7 +217,7 @@ BOOL BuildCommDCBA(LPCSTR lpDef, LPDCB lpDCB) return FALSE; } -BOOL BuildCommDCBW(LPCWSTR lpDef, LPDCB lpDCB) +BOOL BuildCommDCBW(WINPR_ATTR_UNUSED LPCWSTR lpDef, WINPR_ATTR_UNUSED LPDCB lpDCB) { if (!CommInitialized()) return FALSE; @@ -228,7 +228,8 @@ BOOL BuildCommDCBW(LPCWSTR lpDef, LPDCB lpDCB) 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()) return FALSE; @@ -239,7 +240,8 @@ BOOL BuildCommDCBAndTimeoutsA(LPCSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommTi 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()) return FALSE; @@ -250,7 +252,8 @@ BOOL BuildCommDCBAndTimeoutsW(LPCWSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommT 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()) return FALSE; @@ -261,7 +264,8 @@ BOOL CommConfigDialogA(LPCSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC) 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()) return FALSE; @@ -272,7 +276,8 @@ BOOL CommConfigDialogW(LPCWSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC) 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; @@ -289,7 +294,8 @@ BOOL GetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) 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; @@ -306,7 +312,7 @@ BOOL SetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, DWORD dwSize) return FALSE; } -BOOL GetCommMask(HANDLE hFile, PDWORD lpEvtMask) +BOOL GetCommMask(HANDLE hFile, WINPR_ATTR_UNUSED PDWORD lpEvtMask) { WINPR_COMM* pComm = (WINPR_COMM*)hFile; @@ -323,7 +329,7 @@ BOOL GetCommMask(HANDLE hFile, PDWORD lpEvtMask) return FALSE; } -BOOL SetCommMask(HANDLE hFile, DWORD dwEvtMask) +BOOL SetCommMask(HANDLE hFile, WINPR_ATTR_UNUSED DWORD dwEvtMask) { WINPR_COMM* pComm = (WINPR_COMM*)hFile; @@ -340,7 +346,7 @@ BOOL SetCommMask(HANDLE hFile, DWORD dwEvtMask) return FALSE; } -BOOL GetCommModemStatus(HANDLE hFile, PDWORD lpModemStat) +BOOL GetCommModemStatus(HANDLE hFile, WINPR_ATTR_UNUSED PDWORD lpModemStat) { WINPR_COMM* pComm = (WINPR_COMM*)hFile; @@ -807,7 +813,8 @@ BOOL SetCommTimeouts(HANDLE hFile, LPCOMMTIMEOUTS lpCommTimeouts) 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()) return FALSE; @@ -818,7 +825,8 @@ BOOL GetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) 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()) return FALSE; @@ -829,7 +837,8 @@ BOOL GetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize 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()) return FALSE; @@ -840,7 +849,8 @@ BOOL SetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize) 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()) return FALSE; @@ -885,7 +895,8 @@ BOOL ClearCommBreak(HANDLE hFile) 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; @@ -942,7 +953,7 @@ BOOL SetupComm(HANDLE hFile, DWORD dwInQueue, DWORD dwOutQueue) return TRUE; } -BOOL EscapeCommFunction(HANDLE hFile, DWORD dwFunc) +BOOL EscapeCommFunction(HANDLE hFile, WINPR_ATTR_UNUSED DWORD dwFunc) { WINPR_COMM* pComm = (WINPR_COMM*)hFile; @@ -959,7 +970,7 @@ BOOL EscapeCommFunction(HANDLE hFile, DWORD dwFunc) return FALSE; } -BOOL TransmitCommChar(HANDLE hFile, char cChar) +BOOL TransmitCommChar(HANDLE hFile, WINPR_ATTR_UNUSED char cChar) { WINPR_COMM* pComm = (WINPR_COMM*)hFile; @@ -976,7 +987,8 @@ BOOL TransmitCommChar(HANDLE hFile, char cChar) 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; diff --git a/winpr/libwinpr/comm/comm_sercx2_sys.c b/winpr/libwinpr/comm/comm_sercx2_sys.c index 5cb19f237..e79a2402e 100644 --- a/winpr/libwinpr/comm/comm_sercx2_sys.c +++ b/winpr/libwinpr/comm/comm_sercx2_sys.c @@ -39,7 +39,8 @@ * 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(pSerialChars); @@ -47,7 +48,7 @@ static BOOL set_serial_chars(WINPR_COMM* pComm, const SERIAL_CHARS* pSerialChars 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(pSerialChars); diff --git a/winpr/libwinpr/comm/comm_serial_sys.c b/winpr/libwinpr/comm/comm_serial_sys.c index 16428e041..e286a27da 100644 --- a/winpr/libwinpr/comm/comm_serial_sys.c +++ b/winpr/libwinpr/comm/comm_serial_sys.c @@ -154,7 +154,7 @@ static const speed_t BAUD_TABLE[][3] = { 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); /* 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; } -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(pQueueSize); @@ -1606,7 +1606,7 @@ static BOOL get_dtrrts(WINPR_COMM* pComm, ULONG* pMask) 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(pSize); @@ -1640,7 +1640,7 @@ static BOOL immediate_char(WINPR_COMM* pComm, const UCHAR* pChar) 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 */ return TRUE; diff --git a/winpr/libwinpr/crt/alignment.c b/winpr/libwinpr/crt/alignment.c index 049070983..24db9bc0a 100644 --- a/winpr/libwinpr/crt/alignment.c +++ b/winpr/libwinpr/crt/alignment.c @@ -221,7 +221,8 @@ fail: 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; diff --git a/winpr/libwinpr/crt/conversion.c b/winpr/libwinpr/crt/conversion.c index 26044e57f..bab91dc89 100644 --- a/winpr/libwinpr/crt/conversion.c +++ b/winpr/libwinpr/crt/conversion.c @@ -26,7 +26,7 @@ #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); diff --git a/winpr/libwinpr/crt/unicode_icu.c b/winpr/libwinpr/crt/unicode_icu.c index 0f8c3ab0f..4b0f74e3a 100644 --- a/winpr/libwinpr/crt/unicode_icu.c +++ b/winpr/libwinpr/crt/unicode_icu.c @@ -143,9 +143,10 @@ int int_MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, return cchWideChar; } -int int_WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, - LPSTR lpMultiByteStr, int cbMultiByte, LPCSTR lpDefaultChar, - LPBOOL lpUsedDefaultChar) +int int_WideCharToMultiByte(UINT CodePage, WINPR_ATTR_UNUSED DWORD dwFlags, LPCWSTR lpWideCharStr, + int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, + WINPR_ATTR_UNUSED LPCSTR lpDefaultChar, + WINPR_ATTR_UNUSED LPBOOL lpUsedDefaultChar) { /* If cchWideChar is 0, the function fails */ diff --git a/winpr/libwinpr/crypto/cert.c b/winpr/libwinpr/crypto/cert.c index 83b7213fd..c485b4967 100644 --- a/winpr/libwinpr/crypto/cert.c +++ b/winpr/libwinpr/crypto/cert.c @@ -149,6 +149,7 @@ */ #include +#include #include #ifndef _WIN32 @@ -156,7 +157,8 @@ #include "crypto.h" 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; @@ -171,7 +173,8 @@ HCERTSTORE CertOpenStore(LPCSTR lpszStoreProvider, DWORD dwMsgAndCertEncodingTyp return (HCERTSTORE)certstore; } -HCERTSTORE CertOpenSystemStoreW(HCRYPTPROV_LEGACY hProv, LPCWSTR szSubsystemProtocol) +HCERTSTORE CertOpenSystemStoreW(HCRYPTPROV_LEGACY hProv, + WINPR_ATTR_UNUSED LPCWSTR szSubsystemProtocol) { HCERTSTORE hCertStore = NULL; @@ -180,12 +183,13 @@ HCERTSTORE CertOpenSystemStoreW(HCRYPTPROV_LEGACY hProv, LPCWSTR szSubsystemProt return hCertStore; } -HCERTSTORE CertOpenSystemStoreA(HCRYPTPROV_LEGACY hProv, LPCSTR szSubsystemProtocol) +HCERTSTORE CertOpenSystemStoreA(HCRYPTPROV_LEGACY hProv, + WINPR_ATTR_UNUSED LPCSTR szSubsystemProtocol) { return CertOpenSystemStoreW(hProv, NULL); } -BOOL CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) +BOOL CertCloseStore(HCERTSTORE hCertStore, WINPR_ATTR_UNUSED DWORD dwFlags) { WINPR_CERTSTORE* certstore = NULL; @@ -196,27 +200,39 @@ BOOL CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) return TRUE; } -PCCERT_CONTEXT CertFindCertificateInStore(HCERTSTORE hCertStore, DWORD dwCertEncodingType, - DWORD dwFindFlags, DWORD dwFindType, - const void* pvFindPara, PCCERT_CONTEXT pPrevCertContext) +PCCERT_CONTEXT CertFindCertificateInStore(WINPR_ATTR_UNUSED HCERTSTORE hCertStore, + WINPR_ATTR_UNUSED DWORD dwCertEncodingType, + 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; } -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; } -DWORD CertGetNameStringW(PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void* pvTypePara, - LPWSTR pszNameString, DWORD cchNameString) +DWORD CertGetNameStringW(WINPR_ATTR_UNUSED PCCERT_CONTEXT pCertContext, + 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; } -DWORD CertGetNameStringA(PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void* pvTypePara, - LPSTR pszNameString, DWORD cchNameString) +DWORD CertGetNameStringA(WINPR_ATTR_UNUSED PCCERT_CONTEXT pCertContext, + 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; } diff --git a/winpr/libwinpr/crypto/cipher.c b/winpr/libwinpr/crypto/cipher.c index 4233713f3..c2224acb1 100644 --- a/winpr/libwinpr/crypto/cipher.c +++ b/winpr/libwinpr/crypto/cipher.c @@ -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, - const void* key, size_t keylen, const void* iv, - size_t ivlen) + const void* key, WINPR_ATTR_UNUSED size_t keylen, + const void* iv, WINPR_ATTR_UNUSED size_t ivlen) { if (cipher == WINPR_CIPHER_ARC4_128) { diff --git a/winpr/libwinpr/crypto/crypto.c b/winpr/libwinpr/crypto/crypto.c index 9a0cc8773..fc384d32d 100644 --- a/winpr/libwinpr/crypto/crypto.c +++ b/winpr/libwinpr/crypto/crypto.c @@ -18,7 +18,7 @@ */ #include - +#include #include /** @@ -208,7 +208,7 @@ out: return FALSE; } -BOOL CryptUnprotectMemory(LPVOID pData, DWORD cbData, DWORD dwFlags) +BOOL CryptUnprotectMemory(LPVOID pData, WINPR_ATTR_UNUSED DWORD cbData, DWORD dwFlags) { BYTE* pPlainText = NULL; size_t cbOut = 0; @@ -262,41 +262,58 @@ out: return FALSE; } -BOOL CryptProtectData(DATA_BLOB* pDataIn, LPCWSTR szDataDescr, DATA_BLOB* pOptionalEntropy, - PVOID pvReserved, CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct, DWORD dwFlags, - DATA_BLOB* pDataOut) +BOOL CryptProtectData(WINPR_ATTR_UNUSED DATA_BLOB* pDataIn, WINPR_ATTR_UNUSED LPCWSTR szDataDescr, + 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; } -BOOL CryptUnprotectData(DATA_BLOB* pDataIn, LPWSTR* ppszDataDescr, DATA_BLOB* pOptionalEntropy, - PVOID pvReserved, CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct, DWORD dwFlags, - DATA_BLOB* pDataOut) +BOOL CryptUnprotectData(WINPR_ATTR_UNUSED DATA_BLOB* pDataIn, + WINPR_ATTR_UNUSED LPWSTR* ppszDataDescr, + 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; } -BOOL CryptStringToBinaryW(LPCWSTR pszString, DWORD cchString, DWORD dwFlags, BYTE* pbBinary, - DWORD* pcbBinary, DWORD* pdwSkip, DWORD* pdwFlags) +BOOL CryptStringToBinaryW(WINPR_ATTR_UNUSED LPCWSTR pszString, WINPR_ATTR_UNUSED DWORD cchString, + 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; } -BOOL CryptStringToBinaryA(LPCSTR pszString, DWORD cchString, DWORD dwFlags, BYTE* pbBinary, - DWORD* pcbBinary, DWORD* pdwSkip, DWORD* pdwFlags) +BOOL CryptStringToBinaryA(WINPR_ATTR_UNUSED LPCSTR pszString, WINPR_ATTR_UNUSED DWORD cchString, + 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; } -BOOL CryptBinaryToStringW(CONST BYTE* pbBinary, DWORD cbBinary, DWORD dwFlags, LPWSTR pszString, - DWORD* pcchString) +BOOL CryptBinaryToStringW(WINPR_ATTR_UNUSED CONST BYTE* pbBinary, WINPR_ATTR_UNUSED DWORD cbBinary, + WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED LPWSTR pszString, + WINPR_ATTR_UNUSED DWORD* pcchString) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL CryptBinaryToStringA(CONST BYTE* pbBinary, DWORD cbBinary, DWORD dwFlags, LPSTR pszString, - DWORD* pcchString) +BOOL CryptBinaryToStringA(WINPR_ATTR_UNUSED CONST BYTE* pbBinary, WINPR_ATTR_UNUSED DWORD cbBinary, + WINPR_ATTR_UNUSED DWORD dwFlags, WINPR_ATTR_UNUSED LPSTR pszString, + WINPR_ATTR_UNUSED DWORD* pcchString) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } diff --git a/winpr/libwinpr/crypto/hash.c b/winpr/libwinpr/crypto/hash.c index 18af44cad..c0ff4c829 100644 --- a/winpr/libwinpr/crypto/hash.c +++ b/winpr/libwinpr/crypto/hash.c @@ -631,7 +631,7 @@ BOOL winpr_Digest_Update(WINPR_DIGEST_CTX* ctx, const void* input, size_t ilen) 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); diff --git a/winpr/libwinpr/environment/environment.c b/winpr/libwinpr/environment/environment.c index 2aaa2959a..345037bdf 100644 --- a/winpr/libwinpr/environment/environment.c +++ b/winpr/libwinpr/environment/environment.c @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -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; } -BOOL SetCurrentDirectoryA(LPCSTR lpPathName) +BOOL SetCurrentDirectoryA(WINPR_ATTR_UNUSED LPCSTR lpPathName) { + WLog_ERR("TODO", "TODO: not implemented"); return TRUE; } -BOOL SetCurrentDirectoryW(LPCWSTR lpPathName) +BOOL SetCurrentDirectoryW(WINPR_ATTR_UNUSED LPCWSTR lpPathName) { + WLog_ERR("TODO", "TODO: not implemented"); return TRUE; } -DWORD SearchPathA(LPCSTR lpPath, LPCSTR lpFileName, LPCSTR lpExtension, DWORD nBufferLength, - LPSTR lpBuffer, LPSTR* lpFilePart) +DWORD SearchPathA(WINPR_ATTR_UNUSED LPCSTR lpPath, WINPR_ATTR_UNUSED LPCSTR lpFileName, + 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; } -DWORD SearchPathW(LPCWSTR lpPath, LPCWSTR lpFileName, LPCWSTR lpExtension, DWORD nBufferLength, - LPWSTR lpBuffer, LPWSTR* lpFilePart) +DWORD SearchPathW(WINPR_ATTR_UNUSED LPCWSTR lpPath, WINPR_ATTR_UNUSED LPCWSTR lpFileName, + 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; } LPSTR GetCommandLineA(VOID) { + WLog_ERR("TODO", "TODO: not implemented"); return NULL; } LPWSTR GetCommandLineW(VOID) { + WLog_ERR("TODO", "TODO: not implemented"); return NULL; } -BOOL NeedCurrentDirectoryForExePathA(LPCSTR ExeName) +BOOL NeedCurrentDirectoryForExePathA(WINPR_ATTR_UNUSED LPCSTR ExeName) { + WLog_ERR("TODO", "TODO: not implemented"); return TRUE; } -BOOL NeedCurrentDirectoryForExePathW(LPCWSTR ExeName) +BOOL NeedCurrentDirectoryForExePathW(WINPR_ATTR_UNUSED LPCWSTR ExeName) { + WLog_ERR("TODO", "TODO: not implemented"); return TRUE; } @@ -177,8 +189,10 @@ DWORD GetEnvironmentVariableA(LPCSTR lpName, LPSTR lpBuffer, DWORD nSize) #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); return 0; } @@ -208,8 +222,9 @@ BOOL SetEnvironmentVariableA(LPCSTR lpName, LPCSTR lpValue) #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; } @@ -289,26 +304,33 @@ LPCH GetEnvironmentStringsA(VOID) LPWCH GetEnvironmentStringsW(VOID) { + WLog_ERR("TODO", "TODO: not implemented"); return NULL; } -BOOL SetEnvironmentStringsA(LPCH NewEnvironment) +BOOL SetEnvironmentStringsA(WINPR_ATTR_UNUSED LPCH NewEnvironment) { + WLog_ERR("TODO", "TODO: not implemented"); return TRUE; } -BOOL SetEnvironmentStringsW(LPWCH NewEnvironment) +BOOL SetEnvironmentStringsW(WINPR_ATTR_UNUSED LPWCH NewEnvironment) { + WLog_ERR("TODO", "TODO: not implemented"); 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; } -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; } diff --git a/winpr/libwinpr/error/error.c b/winpr/libwinpr/error/error.c index 7746d0239..de7d4f503 100644 --- a/winpr/libwinpr/error/error.c +++ b/winpr/libwinpr/error/error.c @@ -20,6 +20,7 @@ #include #include +#include #ifndef _WIN32 @@ -29,11 +30,13 @@ UINT GetErrorMode(void) { + WLog_ERR("TODO", "TOdO: implement"); return 0; } -UINT SetErrorMode(UINT uMode) +UINT SetErrorMode(WINPR_ATTR_UNUSED UINT uMode) { + WLog_ERR("TODO", "TOdO: implement"); 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, - CONST ULONG_PTR* lpArguments) +VOID RaiseException(WINPR_ATTR_UNUSED DWORD dwExceptionCode, + 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; } 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; } -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; } -ULONG RemoveVectoredExceptionHandler(PVOID Handle) +ULONG RemoveVectoredExceptionHandler(WINPR_ATTR_UNUSED PVOID Handle) { + WLog_ERR("TODO", "TOdO: implement"); 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; } -ULONG RemoveVectoredContinueHandler(PVOID Handle) +ULONG RemoveVectoredContinueHandler(WINPR_ATTR_UNUSED PVOID Handle) { + WLog_ERR("TODO", "TOdO: implement"); return 0; } diff --git a/winpr/libwinpr/file/file.c b/winpr/libwinpr/file/file.c index 657d1f37c..be8eae4f9 100644 --- a/winpr/libwinpr/file/file.c +++ b/winpr/libwinpr/file/file.c @@ -390,8 +390,9 @@ static BOOL FileGetFileInformationByHandle(HANDLE hFile, return TRUE; } -static BOOL FileLockFileEx(HANDLE hFile, DWORD dwFlags, DWORD dwReserved, - DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh, +static BOOL FileLockFileEx(HANDLE hFile, DWORD dwFlags, WINPR_ATTR_UNUSED DWORD dwReserved, + WINPR_ATTR_UNUSED DWORD nNumberOfBytesToLockLow, + WINPR_ATTR_UNUSED DWORD nNumberOfBytesToLockHigh, LPOVERLAPPED lpOverlapped) { #ifdef __sun @@ -463,8 +464,10 @@ static BOOL FileLockFileEx(HANDLE hFile, DWORD dwFlags, DWORD dwReserved, return TRUE; } -static BOOL FileUnlockFile(HANDLE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh, - DWORD nNumberOfBytesToUnlockLow, DWORD nNumberOfBytesToUnlockHigh) +static BOOL FileUnlockFile(HANDLE hFile, WINPR_ATTR_UNUSED DWORD dwFileOffsetLow, + WINPR_ATTR_UNUSED DWORD dwFileOffsetHigh, + WINPR_ATTR_UNUSED DWORD nNumberOfBytesToUnlockLow, + WINPR_ATTR_UNUSED DWORD nNumberOfBytesToUnlockHigh) { WINPR_FILE* pFile = (WINPR_FILE*)hFile; #ifdef __sun @@ -506,8 +509,10 @@ static BOOL FileUnlockFile(HANDLE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffs return TRUE; } -static BOOL FileUnlockFileEx(HANDLE hFile, DWORD dwReserved, DWORD nNumberOfBytesToUnlockLow, - DWORD nNumberOfBytesToUnlockHigh, LPOVERLAPPED lpOverlapped) +static BOOL FileUnlockFileEx(HANDLE hFile, WINPR_ATTR_UNUSED DWORD dwReserved, + WINPR_ATTR_UNUSED DWORD nNumberOfBytesToUnlockLow, + WINPR_ATTR_UNUSED DWORD nNumberOfBytesToUnlockHigh, + LPOVERLAPPED lpOverlapped) { WINPR_FILE* pFile = (WINPR_FILE*)hFile; #ifdef __sun @@ -575,7 +580,7 @@ static struct timespec filetimeToTimespec(const FILETIME* ftime) 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) { struct timespec times[2] = { { UTIME_OMIT, UTIME_OMIT }, @@ -971,7 +976,7 @@ static HANDLE FileCreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dw return pFile; } -static BOOL IsFileDevice(LPCTSTR lpDeviceName) +static BOOL IsFileDevice(WINPR_ATTR_UNUSED LPCTSTR lpDeviceName) { return TRUE; } @@ -1029,12 +1034,13 @@ HANDLE GetStdHandle(DWORD nStdHandle) return (HANDLE)pFile; } -BOOL SetStdHandle(DWORD nStdHandle, HANDLE hHandle) +BOOL SetStdHandle(WINPR_ATTR_UNUSED DWORD nStdHandle, WINPR_ATTR_UNUSED HANDLE hHandle) { 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; } diff --git a/winpr/libwinpr/file/generic.c b/winpr/libwinpr/file/generic.c index de7435311..d004dffa5 100644 --- a/winpr/libwinpr/file/generic.c +++ b/winpr/libwinpr/file/generic.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -470,7 +471,8 @@ BOOL FlushFileBuffers(HANDLE hFile) 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) { LPWIN32_FILE_ATTRIBUTE_DATA fd = lpFileInformation; @@ -1057,7 +1059,8 @@ HANDLE FindFirstFileW(LPCWSTR lpFileName, LPWIN32_FIND_DATAW lpFindFileData) LPSTR utfFileName = NULL; HANDLE h = NULL; if (!lpFileName) - return FALSE; + return INVALID_HANDLE_VALUE; + LPWIN32_FIND_DATAA fd = (LPWIN32_FIND_DATAA)calloc(1, sizeof(WIN32_FIND_DATAA)); if (!fd) @@ -1093,15 +1096,25 @@ out: return h; } -HANDLE FindFirstFileExA(LPCSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, - FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags) +HANDLE FindFirstFileExA(WINPR_ATTR_UNUSED LPCSTR lpFileName, + 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; } -HANDLE FindFirstFileExW(LPCWSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, - FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags) +HANDLE FindFirstFileExW(WINPR_ATTR_UNUSED LPCWSTR lpFileName, + 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; } @@ -1222,7 +1235,8 @@ BOOL FindClose(HANDLE hFindFile) 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)) return TRUE; diff --git a/winpr/libwinpr/file/namedPipeClient.c b/winpr/libwinpr/file/namedPipeClient.c index ad83589fd..76557c4b6 100644 --- a/winpr/libwinpr/file/namedPipeClient.c +++ b/winpr/libwinpr/file/namedPipeClient.c @@ -116,11 +116,12 @@ static HANDLE_OPS ops = { NULL, /* FileGetFileInformationByHandle */ }; -static HANDLE NamedPipeClientCreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, - DWORD dwShareMode, - LPSECURITY_ATTRIBUTES lpSecurityAttributes, - DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, - HANDLE hTemplateFile) +static HANDLE +NamedPipeClientCreateFileA(LPCSTR lpFileName, WINPR_ATTR_UNUSED DWORD dwDesiredAccess, + WINPR_ATTR_UNUSED DWORD dwShareMode, + WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes, + WINPR_ATTR_UNUSED DWORD dwCreationDisposition, + DWORD dwFlagsAndAttributes, WINPR_ATTR_UNUSED HANDLE hTemplateFile) { int status = 0; struct sockaddr_un s = { 0 }; diff --git a/winpr/libwinpr/handle/handle.c b/winpr/libwinpr/handle/handle.c index 5c35d42ad..9ace858cf 100644 --- a/winpr/libwinpr/handle/handle.c +++ b/winpr/libwinpr/handle/handle.c @@ -60,21 +60,27 @@ BOOL CloseHandle(HANDLE hObject) return FALSE; } -BOOL DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle, HANDLE hTargetProcessHandle, - LPHANDLE lpTargetHandle, DWORD dwDesiredAccess, BOOL bInheritHandle, - DWORD dwOptions) +BOOL DuplicateHandle(WINPR_ATTR_UNUSED HANDLE hSourceProcessHandle, + WINPR_ATTR_UNUSED HANDLE hSourceHandle, + 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; 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; } -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; } diff --git a/winpr/libwinpr/interlocked/interlocked.c b/winpr/libwinpr/interlocked/interlocked.c index eb1170904..eee1a5fe9 100644 --- a/winpr/libwinpr/interlocked/interlocked.c +++ b/winpr/libwinpr/interlocked/interlocked.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -97,13 +98,16 @@ WINPR_PSLIST_ENTRY InterlockedPushEntrySList(WINPR_PSLIST_HEADER ListHead, #endif } -WINPR_PSLIST_ENTRY InterlockedPushListSListEx(WINPR_PSLIST_HEADER ListHead, WINPR_PSLIST_ENTRY List, - WINPR_PSLIST_ENTRY ListEnd, ULONG Count) +WINPR_PSLIST_ENTRY InterlockedPushListSListEx(WINPR_ATTR_UNUSED WINPR_PSLIST_HEADER ListHead, + WINPR_ATTR_UNUSED WINPR_PSLIST_ENTRY List, + WINPR_ATTR_UNUSED WINPR_PSLIST_ENTRY ListEnd, + WINPR_ATTR_UNUSED ULONG Count) { WINPR_ASSERT(ListHead); WINPR_ASSERT(List); WINPR_ASSERT(ListEnd); + WLog_ERR("TODO", "TODO: implement"); #ifdef _WIN64 #else diff --git a/winpr/libwinpr/io/device.c b/winpr/libwinpr/io/device.c index b8aabfc0d..05839d6d0 100644 --- a/winpr/libwinpr/io/device.c +++ b/winpr/libwinpr/io/device.c @@ -120,10 +120,11 @@ static char* GetDeviceFileUnixDomainSocketFilePathA(LPCSTR lpName) * http://msdn.microsoft.com/en-us/library/windows/hardware/ff548397/ */ -NTSTATUS _IoCreateDeviceEx(PDRIVER_OBJECT_EX DriverObject, ULONG DeviceExtensionSize, - PUNICODE_STRING DeviceName, DEVICE_TYPE DeviceType, - ULONG DeviceCharacteristics, BOOLEAN Exclusive, - PDEVICE_OBJECT_EX* DeviceObject) +NTSTATUS _IoCreateDeviceEx(WINPR_ATTR_UNUSED PDRIVER_OBJECT_EX DriverObject, + WINPR_ATTR_UNUSED ULONG DeviceExtensionSize, PUNICODE_STRING DeviceName, + WINPR_ATTR_UNUSED DEVICE_TYPE DeviceType, + WINPR_ATTR_UNUSED ULONG DeviceCharacteristics, + WINPR_ATTR_UNUSED BOOLEAN Exclusive, PDEVICE_OBJECT_EX* DeviceObject) { int status = 0; char* DeviceBasePath = NULL; diff --git a/winpr/libwinpr/io/io.c b/winpr/libwinpr/io/io.c index 2df20be19..8694f359a 100644 --- a/winpr/libwinpr/io/io.c +++ b/winpr/libwinpr/io/io.c @@ -48,8 +48,10 @@ #define TAG WINPR_TAG("io") -BOOL GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped, - LPDWORD lpNumberOfBytesTransferred, BOOL bWait) +BOOL GetOverlappedResult(WINPR_ATTR_UNUSED HANDLE hFile, + WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped, + WINPR_ATTR_UNUSED LPDWORD lpNumberOfBytesTransferred, + WINPR_ATTR_UNUSED BOOL bWait) { #if 1 WLog_ERR(TAG, "Not implemented"); @@ -127,73 +129,86 @@ BOOL GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped, #endif } -BOOL GetOverlappedResultEx(HANDLE hFile, LPOVERLAPPED lpOverlapped, - LPDWORD lpNumberOfBytesTransferred, DWORD dwMilliseconds, - BOOL bAlertable) +BOOL GetOverlappedResultEx(WINPR_ATTR_UNUSED HANDLE hFile, + WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped, + WINPR_ATTR_UNUSED LPDWORD lpNumberOfBytesTransferred, + WINPR_ATTR_UNUSED DWORD dwMilliseconds, + WINPR_ATTR_UNUSED BOOL bAlertable) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } -BOOL DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, - LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, - LPOVERLAPPED lpOverlapped) +BOOL DeviceIoControl(WINPR_ATTR_UNUSED HANDLE hDevice, WINPR_ATTR_UNUSED DWORD dwIoControlCode, + WINPR_ATTR_UNUSED LPVOID lpInBuffer, WINPR_ATTR_UNUSED DWORD nInBufferSize, + 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"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } -HANDLE CreateIoCompletionPort(HANDLE FileHandle, HANDLE ExistingCompletionPort, - ULONG_PTR CompletionKey, DWORD NumberOfConcurrentThreads) +HANDLE CreateIoCompletionPort(WINPR_ATTR_UNUSED HANDLE FileHandle, + WINPR_ATTR_UNUSED HANDLE ExistingCompletionPort, + WINPR_ATTR_UNUSED ULONG_PTR CompletionKey, + WINPR_ATTR_UNUSED DWORD NumberOfConcurrentThreads) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return NULL; } -BOOL GetQueuedCompletionStatus(HANDLE CompletionPort, LPDWORD lpNumberOfBytesTransferred, - PULONG_PTR lpCompletionKey, LPOVERLAPPED* lpOverlapped, - DWORD dwMilliseconds) +BOOL GetQueuedCompletionStatus(WINPR_ATTR_UNUSED HANDLE CompletionPort, + WINPR_ATTR_UNUSED LPDWORD lpNumberOfBytesTransferred, + WINPR_ATTR_UNUSED PULONG_PTR lpCompletionKey, + WINPR_ATTR_UNUSED LPOVERLAPPED* lpOverlapped, + WINPR_ATTR_UNUSED DWORD dwMilliseconds) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } -BOOL GetQueuedCompletionStatusEx(HANDLE CompletionPort, LPOVERLAPPED_ENTRY lpCompletionPortEntries, - ULONG ulCount, PULONG ulNumEntriesRemoved, DWORD dwMilliseconds, - BOOL fAlertable) +BOOL GetQueuedCompletionStatusEx(WINPR_ATTR_UNUSED HANDLE CompletionPort, + WINPR_ATTR_UNUSED LPOVERLAPPED_ENTRY lpCompletionPortEntries, + 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"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } -BOOL PostQueuedCompletionStatus(HANDLE CompletionPort, DWORD dwNumberOfBytesTransferred, - ULONG_PTR dwCompletionKey, LPOVERLAPPED lpOverlapped) +BOOL PostQueuedCompletionStatus(WINPR_ATTR_UNUSED HANDLE CompletionPort, + WINPR_ATTR_UNUSED DWORD dwNumberOfBytesTransferred, + WINPR_ATTR_UNUSED ULONG_PTR dwCompletionKey, + WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } -BOOL CancelIo(HANDLE hFile) +BOOL CancelIo(WINPR_ATTR_UNUSED HANDLE hFile) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 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"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } -BOOL CancelSynchronousIo(HANDLE hThread) +BOOL CancelSynchronousIo(WINPR_ATTR_UNUSED HANDLE hThread) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); diff --git a/winpr/libwinpr/library/library.c b/winpr/libwinpr/library/library.c index 7c51a2f5b..08292640e 100644 --- a/winpr/libwinpr/library/library.c +++ b/winpr/libwinpr/library/library.c @@ -83,7 +83,7 @@ #endif -DLL_DIRECTORY_COOKIE AddDllDirectory(PCWSTR NewDirectory) +DLL_DIRECTORY_COOKIE AddDllDirectory(WINPR_ATTR_UNUSED PCWSTR NewDirectory) { /* TODO: Implement */ WLog_ERR(TAG, "not implemented"); @@ -91,7 +91,7 @@ DLL_DIRECTORY_COOKIE AddDllDirectory(PCWSTR NewDirectory) return NULL; } -BOOL RemoveDllDirectory(DLL_DIRECTORY_COOKIE Cookie) +BOOL RemoveDllDirectory(WINPR_ATTR_UNUSED DLL_DIRECTORY_COOKIE Cookie) { /* TODO: Implement */ WLog_ERR(TAG, "not implemented"); @@ -99,7 +99,7 @@ BOOL RemoveDllDirectory(DLL_DIRECTORY_COOKIE Cookie) return FALSE; } -BOOL SetDefaultDllDirectories(DWORD DirectoryFlags) +BOOL SetDefaultDllDirectories(WINPR_ATTR_UNUSED DWORD DirectoryFlags) { /* TODO: Implement */ WLog_ERR(TAG, "not implemented"); @@ -210,7 +210,7 @@ BOOL FreeLibrary(HMODULE hLibModule) return TRUE; } -HMODULE GetModuleHandleA(LPCSTR lpModuleName) +HMODULE GetModuleHandleA(WINPR_ATTR_UNUSED LPCSTR lpModuleName) { /* TODO: Implement */ WLog_ERR(TAG, "not implemented"); @@ -218,7 +218,7 @@ HMODULE GetModuleHandleA(LPCSTR lpModuleName) return NULL; } -HMODULE GetModuleHandleW(LPCWSTR lpModuleName) +HMODULE GetModuleHandleW(WINPR_ATTR_UNUSED LPCWSTR lpModuleName) { /* TODO: Implement */ WLog_ERR(TAG, "not implemented"); diff --git a/winpr/libwinpr/memory/memory.c b/winpr/libwinpr/memory/memory.c index 5c6f5e042..9ded9dc84 100644 --- a/winpr/libwinpr/memory/memory.c +++ b/winpr/libwinpr/memory/memory.c @@ -20,6 +20,7 @@ #include #include +#include #include @@ -76,9 +77,13 @@ #include "memory.h" -HANDLE CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWORD flProtect, - DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCSTR lpName) +HANDLE CreateFileMappingA(WINPR_ATTR_UNUSED HANDLE hFile, + 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) { return NULL; /* not yet implemented */ @@ -87,41 +92,62 @@ HANDLE CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWOR return NULL; } -HANDLE CreateFileMappingW(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWORD flProtect, - DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCWSTR lpName) +HANDLE CreateFileMappingW(WINPR_ATTR_UNUSED HANDLE hFile, + 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; } -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; } -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; } -LPVOID MapViewOfFile(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, - DWORD dwFileOffsetLow, size_t dwNumberOfBytesToMap) +LPVOID MapViewOfFile(WINPR_ATTR_UNUSED HANDLE hFileMappingObject, + 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; } -LPVOID MapViewOfFileEx(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, - DWORD dwFileOffsetLow, size_t dwNumberOfBytesToMap, LPVOID lpBaseAddress) +LPVOID MapViewOfFileEx(WINPR_ATTR_UNUSED HANDLE hFileMappingObject, + 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; } -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; } -BOOL UnmapViewOfFile(LPCVOID lpBaseAddress) +BOOL UnmapViewOfFile(WINPR_ATTR_UNUSED LPCVOID lpBaseAddress) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } diff --git a/winpr/libwinpr/ncrypt/ncrypt.c b/winpr/libwinpr/ncrypt/ncrypt.c index d5b6e5f89..467837295 100644 --- a/winpr/libwinpr/ncrypt/ncrypt.c +++ b/winpr/libwinpr/ncrypt/ncrypt.c @@ -99,7 +99,8 @@ SECURITY_STATUS winpr_NCryptDefault_dtor(NCRYPT_HANDLE handle) } SECURITY_STATUS NCryptEnumStorageProviders(DWORD* wProviderCount, - NCryptProviderName** ppProviderList, DWORD dwFlags) + NCryptProviderName** ppProviderList, + WINPR_ATTR_UNUSED DWORD dwFlags) { NCryptProviderName* ret = NULL; size_t stringAllocSize = 0; diff --git a/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c b/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c index a8cde64ee..94f652200 100644 --- a/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c +++ b/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c @@ -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, NCryptKeyName** ppKeyName, PVOID* ppEnumState, - DWORD dwFlags) + WINPR_ATTR_UNUSED DWORD dwFlags) { NCryptP11ProviderHandle* provider = (NCryptP11ProviderHandle*)hProvider; 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, NCryptKeyGetPropertyEnum property, PBYTE pbOutput, - DWORD cbOutput, DWORD* pcbResult, DWORD dwFlags) + DWORD cbOutput, DWORD* pcbResult, + WINPR_ATTR_UNUSED DWORD dwFlags) { SECURITY_STATUS ret = NTE_FAIL; 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, - LPCWSTR pszKeyName, DWORD dwLegacyKeySpec, DWORD dwFlags) + LPCWSTR pszKeyName, WINPR_ATTR_UNUSED DWORD dwLegacyKeySpec, + WINPR_ATTR_UNUSED DWORD dwFlags) { SECURITY_STATUS ret = 0; CK_SLOT_ID slotId = 0; @@ -1272,8 +1274,8 @@ fail: } SECURITY_STATUS NCryptOpenP11StorageProviderEx(NCRYPT_PROV_HANDLE* phProvider, - LPCWSTR pszProviderName, DWORD dwFlags, - LPCSTR* modulePaths) + WINPR_ATTR_UNUSED LPCWSTR pszProviderName, + WINPR_ATTR_UNUSED DWORD dwFlags, LPCSTR* modulePaths) { SECURITY_STATUS status = ERROR_INVALID_PARAMETER; LPCSTR defaultPaths[] = { "p11-kit-proxy.so", "opensc-pkcs11.so", NULL }; diff --git a/winpr/libwinpr/path/include/PathAllocCombine.h b/winpr/libwinpr/path/include/PathAllocCombine.h index cb55dab8f..77f442380 100644 --- a/winpr/libwinpr/path/include/PathAllocCombine.h +++ b/winpr/libwinpr/path/include/PathAllocCombine.h @@ -27,8 +27,8 @@ #if DEFINE_UNICODE -HRESULT PATH_ALLOC_COMBINE(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlags, - PWSTR* ppszPathOut) +HRESULT PATH_ALLOC_COMBINE(PCWSTR pszPathIn, PCWSTR pszMore, + WINPR_ATTR_UNUSED unsigned long dwFlags, PWSTR* ppszPathOut) { 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 -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."); diff --git a/winpr/libwinpr/path/include/PathCchAddSeparatorEx.h b/winpr/libwinpr/path/include/PathCchAddSeparatorEx.h index 404f7f5eb..5bccd0bef 100644 --- a/winpr/libwinpr/path/include/PathCchAddSeparatorEx.h +++ b/winpr/libwinpr/path/include/PathCchAddSeparatorEx.h @@ -9,8 +9,8 @@ #if DEFINE_UNICODE -HRESULT PATH_CCH_ADD_SEPARATOR_EX(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd, - size_t* pcchRemaining) +HRESULT PATH_CCH_ADD_SEPARATOR_EX(PWSTR pszPath, size_t cchPath, WINPR_ATTR_UNUSED PWSTR* ppszEnd, + WINPR_ATTR_UNUSED size_t* pcchRemaining) { size_t pszPathLength; @@ -35,8 +35,9 @@ HRESULT PATH_CCH_ADD_SEPARATOR_EX(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd, #else -HRESULT PATH_CCH_ADD_SEPARATOR_EX(PSTR pszPath, size_t cchPath, PSTR* ppszEnd, - size_t* pcchRemaining) +HRESULT PATH_CCH_ADD_SEPARATOR_EX(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath, + WINPR_ATTR_UNUSED PSTR* ppszEnd, + WINPR_ATTR_UNUSED size_t* pcchRemaining) { size_t pszPathLength; diff --git a/winpr/libwinpr/path/path.c b/winpr/libwinpr/path/path.c index c6929697a..449febc8c 100644 --- a/winpr/libwinpr/path/path.c +++ b/winpr/libwinpr/path/path.c @@ -136,13 +136,13 @@ * 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"); 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"); return E_NOTIMPL; @@ -206,15 +206,17 @@ HRESULT PathCchRemoveBackslashW(PWSTR pszPath, size_t cchPath) #undef CUR_PATH_SEPARATOR_CHR #undef PATH_CCH_ADD_SEPARATOR_EX -HRESULT PathCchRemoveBackslashExA(PSTR pszPath, size_t cchPath, PSTR* ppszEnd, - size_t* pcchRemaining) +HRESULT PathCchRemoveBackslashExA(WINPR_ATTR_UNUSED PSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath, + WINPR_ATTR_UNUSED PSTR* ppszEnd, + WINPR_ATTR_UNUSED size_t* pcchRemaining) { WLog_ERR(TAG, "not implemented"); return E_NOTIMPL; } -HRESULT PathCchRemoveBackslashExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd, - size_t* pcchRemaining) +HRESULT PathCchRemoveBackslashExW(WINPR_ATTR_UNUSED PWSTR pszPath, WINPR_ATTR_UNUSED size_t cchPath, + WINPR_ATTR_UNUSED PWSTR* ppszEnd, + WINPR_ATTR_UNUSED size_t* pcchRemaining) { WLog_ERR(TAG, "not implemented"); return E_NOTIMPL; @@ -352,13 +354,15 @@ HRESULT PathCchRemoveBackslashExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd, * 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"); 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"); return E_NOTIMPL; @@ -368,13 +372,16 @@ HRESULT PathCchAppendExW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore, unsigned * 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"); 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"); return E_NOTIMPL; @@ -384,15 +391,19 @@ HRESULT PathCchCanonicalizeW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPath * PathCchCanonicalizeEx */ -HRESULT PathCchCanonicalizeExA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn, - unsigned long dwFlags) +HRESULT PathCchCanonicalizeExA(WINPR_ATTR_UNUSED PSTR pszPathOut, + WINPR_ATTR_UNUSED size_t cchPathOut, + WINPR_ATTR_UNUSED PCSTR pszPathIn, + WINPR_ATTR_UNUSED unsigned long dwFlags) { WLog_ERR(TAG, "not implemented"); return E_NOTIMPL; } -HRESULT PathCchCanonicalizeExW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, - unsigned long dwFlags) +HRESULT PathCchCanonicalizeExW(WINPR_ATTR_UNUSED PWSTR pszPathOut, + WINPR_ATTR_UNUSED size_t cchPathOut, + WINPR_ATTR_UNUSED PCWSTR pszPathIn, + WINPR_ATTR_UNUSED unsigned long dwFlags) { WLog_ERR(TAG, "not implemented"); return E_NOTIMPL; @@ -402,13 +413,17 @@ HRESULT PathCchCanonicalizeExW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPa * 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"); 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"); return E_NOTIMPL; @@ -418,13 +433,15 @@ HRESULT PathAllocCanonicalizeW(PCWSTR pszPathIn, unsigned long dwFlags, PWSTR* p * 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"); 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"); return E_NOTIMPL; @@ -434,15 +451,17 @@ HRESULT PathCchCombineW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, P * PathCchCombineEx */ -HRESULT PathCchCombineExA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn, PCSTR pszMore, - unsigned long dwFlags) +HRESULT PathCchCombineExA(WINPR_ATTR_UNUSED PSTR pszPathOut, WINPR_ATTR_UNUSED size_t cchPathOut, + WINPR_ATTR_UNUSED PCSTR pszPathIn, WINPR_ATTR_UNUSED PCSTR pszMore, + WINPR_ATTR_UNUSED unsigned long dwFlags) { WLog_ERR(TAG, "not implemented"); return E_NOTIMPL; } -HRESULT PathCchCombineExW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, PCWSTR pszMore, - unsigned long dwFlags) +HRESULT PathCchCombineExW(WINPR_ATTR_UNUSED PWSTR pszPathOut, WINPR_ATTR_UNUSED size_t cchPathOut, + WINPR_ATTR_UNUSED PCWSTR pszPathIn, WINPR_ATTR_UNUSED PCWSTR pszMore, + WINPR_ATTR_UNUSED unsigned long dwFlags) { WLog_ERR(TAG, "not implemented"); return E_NOTIMPL; @@ -564,7 +583,8 @@ HRESULT PathCchFindExtensionA(PCSTR pszPath, size_t cchPath, PCSTR* ppszExt) 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"); return E_NOTIMPL; @@ -574,13 +594,15 @@ HRESULT PathCchFindExtensionW(PCWSTR pszPath, size_t cchPath, PCWSTR* ppszExt) * 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"); 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"); return E_NOTIMPL; @@ -590,13 +612,13 @@ HRESULT PathCchRenameExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt) * 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"); 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"); return E_NOTIMPL; @@ -606,13 +628,13 @@ HRESULT PathCchRemoveExtensionW(PWSTR pszPath, size_t cchPath) * PathCchIsRoot */ -BOOL PathCchIsRootA(PCSTR pszPath) +BOOL PathCchIsRootA(WINPR_ATTR_UNUSED PCSTR pszPath) { WLog_ERR(TAG, "not implemented"); return FALSE; } -BOOL PathCchIsRootW(PCWSTR pszPath) +BOOL PathCchIsRootW(WINPR_ATTR_UNUSED PCWSTR pszPath) { WLog_ERR(TAG, "not implemented"); return FALSE; @@ -654,13 +676,13 @@ BOOL PathIsUNCExW(PCWSTR pszPath, PCWSTR* ppszServer) * PathCchSkipRoot */ -HRESULT PathCchSkipRootA(PCSTR pszPath, PCSTR* ppszRootEnd) +HRESULT PathCchSkipRootA(WINPR_ATTR_UNUSED PCSTR pszPath, WINPR_ATTR_UNUSED PCSTR* ppszRootEnd) { WLog_ERR(TAG, "not implemented"); 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"); return E_NOTIMPL; @@ -670,13 +692,13 @@ HRESULT PathCchSkipRootW(PCWSTR pszPath, PCWSTR* ppszRootEnd) * 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"); 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"); return E_NOTIMPL; @@ -764,13 +786,13 @@ HRESULT PathCchStripPrefixW(PWSTR pszPath, size_t cchPath) * 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"); 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"); return E_NOTIMPL; diff --git a/winpr/libwinpr/path/shell.c b/winpr/libwinpr/path/shell.c index 03edec242..3f0422143 100644 --- a/winpr/libwinpr/path/shell.c +++ b/winpr/libwinpr/path/shell.c @@ -497,7 +497,7 @@ fail: return NULL; } -BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes) +BOOL PathMakePathA(LPCSTR path, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpAttributes) { #if defined(_UWP) return FALSE; @@ -550,7 +550,7 @@ BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes) #endif } -BOOL PathMakePathW(LPCWSTR path, LPSECURITY_ATTRIBUTES lpAttributes) +BOOL PathMakePathW(LPCWSTR path, WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpAttributes) { #if defined(_UWP) return FALSE; diff --git a/winpr/libwinpr/pipe/pipe.c b/winpr/libwinpr/pipe/pipe.c index f1f76cb2e..731feda19 100644 --- a/winpr/libwinpr/pipe/pipe.c +++ b/winpr/libwinpr/pipe/pipe.c @@ -728,9 +728,12 @@ out: return INVALID_HANDLE_VALUE; } -HANDLE CreateNamedPipeW(LPCWSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, - DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, - LPSECURITY_ATTRIBUTES lpSecurityAttributes) +HANDLE CreateNamedPipeW(WINPR_ATTR_UNUSED LPCWSTR lpName, WINPR_ATTR_UNUSED DWORD dwOpenMode, + WINPR_ATTR_UNUSED DWORD dwPipeMode, WINPR_ATTR_UNUSED DWORD nMaxInstances, + 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"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); @@ -803,17 +806,21 @@ BOOL DisconnectNamedPipe(HANDLE hNamedPipe) return TRUE; } -BOOL PeekNamedPipe(HANDLE hNamedPipe, LPVOID lpBuffer, DWORD nBufferSize, LPDWORD lpBytesRead, - LPDWORD lpTotalBytesAvail, LPDWORD lpBytesLeftThisMessage) +BOOL PeekNamedPipe(WINPR_ATTR_UNUSED HANDLE hNamedPipe, WINPR_ATTR_UNUSED LPVOID lpBuffer, + 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"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } -BOOL TransactNamedPipe(HANDLE hNamedPipe, LPVOID lpInBuffer, DWORD nInBufferSize, - LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesRead, - LPOVERLAPPED lpOverlapped) +BOOL TransactNamedPipe(WINPR_ATTR_UNUSED HANDLE hNamedPipe, WINPR_ATTR_UNUSED LPVOID lpInBuffer, + WINPR_ATTR_UNUSED DWORD nInBufferSize, WINPR_ATTR_UNUSED LPVOID lpOutBuffer, + WINPR_ATTR_UNUSED DWORD nOutBufferSize, + WINPR_ATTR_UNUSED LPDWORD lpBytesRead, + WINPR_ATTR_UNUSED LPOVERLAPPED lpOverlapped) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); @@ -858,7 +865,7 @@ BOOL WaitNamedPipeA(LPCSTR lpNamedPipeName, DWORD nTimeOut) 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"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); @@ -908,23 +915,25 @@ BOOL SetNamedPipeHandleState(HANDLE hNamedPipe, LPDWORD lpMode, LPDWORD lpMaxCol return TRUE; } -BOOL ImpersonateNamedPipeClient(HANDLE hNamedPipe) +BOOL ImpersonateNamedPipeClient(WINPR_ATTR_UNUSED HANDLE hNamedPipe) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } -BOOL GetNamedPipeClientComputerNameA(HANDLE Pipe, LPCSTR ClientComputerName, - ULONG ClientComputerNameLength) +BOOL GetNamedPipeClientComputerNameA(WINPR_ATTR_UNUSED HANDLE Pipe, + WINPR_ATTR_UNUSED LPCSTR ClientComputerName, + WINPR_ATTR_UNUSED ULONG ClientComputerNameLength) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } -BOOL GetNamedPipeClientComputerNameW(HANDLE Pipe, LPCWSTR ClientComputerName, - ULONG ClientComputerNameLength) +BOOL GetNamedPipeClientComputerNameW(WINPR_ATTR_UNUSED HANDLE Pipe, + WINPR_ATTR_UNUSED LPCWSTR ClientComputerName, + WINPR_ATTR_UNUSED ULONG ClientComputerNameLength) { WLog_ERR(TAG, "Not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); diff --git a/winpr/libwinpr/pool/callback.c b/winpr/libwinpr/pool/callback.c index 46c160574..ce628e4f7 100644 --- a/winpr/libwinpr/pool/callback.c +++ b/winpr/libwinpr/pool/callback.c @@ -21,6 +21,7 @@ #include #include +#include #include #ifdef WINPR_THREAD_POOL @@ -40,13 +41,14 @@ static BOOL CALLBACK init_module(PINIT_ONCE once, PVOID param, PVOID* context) } #endif -BOOL winpr_CallbackMayRunLong(PTP_CALLBACK_INSTANCE pci) +BOOL winpr_CallbackMayRunLong(WINPR_ATTR_UNUSED PTP_CALLBACK_INSTANCE pci) { #ifdef _WIN32 InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); if (pCallbackMayRunLong) return pCallbackMayRunLong(pci); #endif + WLog_ERR("TODO", "TODO: implement"); /* No default implementation */ return FALSE; } diff --git a/winpr/libwinpr/pool/callback_cleanup.c b/winpr/libwinpr/pool/callback_cleanup.c index 068a34612..d40ec51c9 100644 --- a/winpr/libwinpr/pool/callback_cleanup.c +++ b/winpr/libwinpr/pool/callback_cleanup.c @@ -60,7 +60,8 @@ static BOOL CALLBACK init_module(PINIT_ONCE once, PVOID param, PVOID* context) } #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 InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); @@ -70,10 +71,12 @@ VOID SetEventWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE evt) return; } #endif + WLog_ERR("TODO", "TODO: implement"); /* 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 InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); @@ -84,9 +87,11 @@ VOID ReleaseSemaphoreWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE sem, } #endif /* 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 InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); @@ -97,9 +102,11 @@ VOID ReleaseMutexWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE mut) } #endif /* 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 InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); @@ -109,9 +116,11 @@ VOID LeaveCriticalSectionWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, PCRITICA } #endif /* 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 InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); @@ -122,9 +131,10 @@ VOID FreeLibraryWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HMODULE mod) } #endif /* 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 InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); @@ -134,6 +144,7 @@ VOID DisassociateCurrentThreadFromCallback(PTP_CALLBACK_INSTANCE pci) return; } #endif + WLog_ERR("TODO", "TODO: implement"); /* No default implementation */ } diff --git a/winpr/libwinpr/pool/cleanup_group.c b/winpr/libwinpr/pool/cleanup_group.c index 50b68e20d..33b854e7e 100644 --- a/winpr/libwinpr/pool/cleanup_group.c +++ b/winpr/libwinpr/pool/cleanup_group.c @@ -92,8 +92,9 @@ VOID winpr_SetThreadpoolCallbackCleanupGroup(PTP_CALLBACK_ENVIRON pcbe, PTP_CLEA #endif } -VOID winpr_CloseThreadpoolCleanupGroupMembers(PTP_CLEANUP_GROUP ptpcg, BOOL fCancelPendingCallbacks, - PVOID pvCleanupContext) +VOID winpr_CloseThreadpoolCleanupGroupMembers(WINPR_ATTR_UNUSED PTP_CLEANUP_GROUP ptpcg, + WINPR_ATTR_UNUSED BOOL fCancelPendingCallbacks, + WINPR_ATTR_UNUSED PVOID pvCleanupContext) { #ifdef _WIN32 InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); diff --git a/winpr/libwinpr/pool/io.c b/winpr/libwinpr/pool/io.c index 7442c3717..f0364524f 100644 --- a/winpr/libwinpr/pool/io.c +++ b/winpr/libwinpr/pool/io.c @@ -21,29 +21,38 @@ #include #include +#include #ifdef WINPR_THREAD_POOL -PTP_IO winpr_CreateThreadpoolIo(HANDLE fl, PTP_WIN32_IO_CALLBACK pfnio, PVOID pv, - PTP_CALLBACK_ENVIRON pcbe) +PTP_IO winpr_CreateThreadpoolIo(WINPR_ATTR_UNUSED HANDLE fl, + 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; } -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 diff --git a/winpr/libwinpr/pool/synch.c b/winpr/libwinpr/pool/synch.c index 1586a0ec5..d69ce3408 100644 --- a/winpr/libwinpr/pool/synch.c +++ b/winpr/libwinpr/pool/synch.c @@ -21,24 +21,33 @@ #include #include +#include #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; } -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 diff --git a/winpr/libwinpr/pool/timer.c b/winpr/libwinpr/pool/timer.c index a8aa1a785..393dbe3f2 100644 --- a/winpr/libwinpr/pool/timer.c +++ b/winpr/libwinpr/pool/timer.c @@ -21,30 +21,41 @@ #include #include +#include #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; } -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; } -VOID winpr_SetThreadpoolTimer(PTP_TIMER pti, PFILETIME pftDueTime, DWORD msPeriod, - DWORD msWindowLength) +VOID winpr_SetThreadpoolTimer(WINPR_ATTR_UNUSED PTP_TIMER pti, + 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 diff --git a/winpr/libwinpr/pool/work.c b/winpr/libwinpr/pool/work.c index 0fd2e65c4..63e9a0430 100644 --- a/winpr/libwinpr/pool/work.c +++ b/winpr/libwinpr/pool/work.c @@ -155,8 +155,9 @@ VOID winpr_SubmitThreadpoolWork(PTP_WORK pwk) // NOLINTNEXTLINE(clang-analyzer-unix.Malloc): Queue_Enqueue takes ownership of callbackInstance } -BOOL winpr_TrySubmitThreadpoolCallback(PTP_SIMPLE_CALLBACK pfns, PVOID pv, - PTP_CALLBACK_ENVIRON pcbe) +BOOL winpr_TrySubmitThreadpoolCallback(WINPR_ATTR_UNUSED PTP_SIMPLE_CALLBACK pfns, + WINPR_ATTR_UNUSED PVOID pv, + WINPR_ATTR_UNUSED PTP_CALLBACK_ENVIRON pcbe) { #ifdef _WIN32 InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL); @@ -169,7 +170,8 @@ BOOL winpr_TrySubmitThreadpoolCallback(PTP_SIMPLE_CALLBACK pfns, PVOID pv, return FALSE; } -VOID winpr_WaitForThreadpoolWorkCallbacks(PTP_WORK pwk, BOOL fCancelPendingCallbacks) +VOID winpr_WaitForThreadpoolWorkCallbacks(PTP_WORK pwk, + WINPR_ATTR_UNUSED BOOL fCancelPendingCallbacks) { HANDLE event = NULL; PTP_POOL pool = NULL; diff --git a/winpr/libwinpr/registry/registry.c b/winpr/libwinpr/registry/registry.c index e04c89c45..761572f33 100644 --- a/winpr/libwinpr/registry/registry.c +++ b/winpr/libwinpr/registry/registry.c @@ -57,65 +57,73 @@ LONG RegCloseKey(HKEY hKey) 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"); 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"); return -1; } -LONG RegCreateKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass, DWORD dwOptions, - REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, - LPDWORD lpdwDisposition) +LONG RegCreateKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey, + WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED LPWSTR lpClass, + 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"); return -1; } -LONG RegCreateKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD Reserved, LPSTR lpClass, DWORD dwOptions, - REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, - LPDWORD lpdwDisposition) +LONG RegCreateKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpSubKey, + WINPR_ATTR_UNUSED DWORD Reserved, WINPR_ATTR_UNUSED LPSTR lpClass, + 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"); 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"); 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"); 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"); 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"); 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"); 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"); return -1; @@ -127,109 +135,134 @@ LONG RegDisablePredefinedCacheEx(void) return -1; } -LONG RegEnumKeyExW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, LPDWORD lpcName, LPDWORD lpReserved, - LPWSTR lpClass, LPDWORD lpcClass, PFILETIME lpftLastWriteTime) +LONG RegEnumKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex, + 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"); return -1; } -LONG RegEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpName, LPDWORD lpcName, LPDWORD lpReserved, - LPSTR lpClass, LPDWORD lpcClass, PFILETIME lpftLastWriteTime) +LONG RegEnumKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex, + 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"); return -1; } -LONG RegEnumValueW(HKEY hKey, DWORD dwIndex, LPWSTR lpValueName, LPDWORD lpcchValueName, - LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) +LONG RegEnumValueW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex, + 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"); return -1; } -LONG RegEnumValueA(HKEY hKey, DWORD dwIndex, LPSTR lpValueName, LPDWORD lpcchValueName, - LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) +LONG RegEnumValueA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED DWORD dwIndex, + 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"); return -1; } -LONG RegFlushKey(HKEY hKey) +LONG RegFlushKey(WINPR_ATTR_UNUSED HKEY hKey) { WLog_ERR(TAG, "TODO: Implement"); return -1; } -LONG RegGetKeySecurity(HKEY hKey, SECURITY_INFORMATION SecurityInformation, - PSECURITY_DESCRIPTOR pSecurityDescriptor, LPDWORD lpcbSecurityDescriptor) +LONG RegGetKeySecurity(WINPR_ATTR_UNUSED HKEY hKey, + WINPR_ATTR_UNUSED SECURITY_INFORMATION SecurityInformation, + WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED LPDWORD lpcbSecurityDescriptor) { WLog_ERR(TAG, "TODO: Implement"); return -1; } -LONG RegGetValueW(HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpValue, DWORD dwFlags, LPDWORD pdwType, - PVOID pvData, LPDWORD pcbData) +LONG RegGetValueW(WINPR_ATTR_UNUSED HKEY hkey, WINPR_ATTR_UNUSED LPCWSTR lpSubKey, + 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"); return -1; } -LONG RegGetValueA(HKEY hkey, LPCSTR lpSubKey, LPCSTR lpValue, DWORD dwFlags, LPDWORD pdwType, - PVOID pvData, LPDWORD pcbData) +LONG RegGetValueA(WINPR_ATTR_UNUSED HKEY hkey, WINPR_ATTR_UNUSED LPCSTR lpSubKey, + 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"); return -1; } -LONG RegLoadAppKeyW(LPCWSTR lpFile, PHKEY phkResult, REGSAM samDesired, DWORD dwOptions, - DWORD Reserved) +LONG RegLoadAppKeyW(WINPR_ATTR_UNUSED LPCWSTR lpFile, WINPR_ATTR_UNUSED PHKEY phkResult, + WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD dwOptions, + WINPR_ATTR_UNUSED DWORD Reserved) { WLog_ERR(TAG, "TODO: Implement"); return -1; } -LONG RegLoadAppKeyA(LPCSTR lpFile, PHKEY phkResult, REGSAM samDesired, DWORD dwOptions, - DWORD Reserved) +LONG RegLoadAppKeyA(WINPR_ATTR_UNUSED LPCSTR lpFile, WINPR_ATTR_UNUSED PHKEY phkResult, + WINPR_ATTR_UNUSED REGSAM samDesired, WINPR_ATTR_UNUSED DWORD dwOptions, + WINPR_ATTR_UNUSED DWORD Reserved) { WLog_ERR(TAG, "TODO: Implement"); 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"); 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"); return -1; } -LONG RegLoadMUIStringW(HKEY hKey, LPCWSTR pszValue, LPWSTR pszOutBuf, DWORD cbOutBuf, - LPDWORD pcbData, DWORD Flags, LPCWSTR pszDirectory) +LONG RegLoadMUIStringW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR pszValue, + 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"); return -1; } -LONG RegLoadMUIStringA(HKEY hKey, LPCSTR pszValue, LPSTR pszOutBuf, DWORD cbOutBuf, LPDWORD pcbData, - DWORD Flags, LPCSTR pszDirectory) +LONG RegLoadMUIStringA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR pszValue, + 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"); return -1; } -LONG RegNotifyChangeKeyValue(HKEY hKey, BOOL bWatchSubtree, DWORD dwNotifyFilter, HANDLE hEvent, - BOOL fAsynchronous) +LONG RegNotifyChangeKeyValue(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED BOOL bWatchSubtree, + WINPR_ATTR_UNUSED DWORD dwNotifyFilter, + WINPR_ATTR_UNUSED HANDLE hEvent, WINPR_ATTR_UNUSED BOOL fAsynchronous) { WLog_ERR(TAG, "TODO: Implement"); 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"); return -1; @@ -247,7 +280,8 @@ LONG RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesir 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(); @@ -281,25 +315,36 @@ LONG RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesire 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"); return -1; } -LONG RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, - LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, - LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, - LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime) +LONG RegQueryInfoKeyW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPWSTR lpClass, + WINPR_ATTR_UNUSED LPDWORD lpcClass, WINPR_ATTR_UNUSED LPDWORD lpReserved, + WINPR_ATTR_UNUSED LPDWORD lpcSubKeys, + 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"); return -1; } -LONG RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, - LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, - LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, - LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime) +LONG RegQueryInfoKeyA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPSTR lpClass, + WINPR_ATTR_UNUSED LPDWORD lpcClass, WINPR_ATTR_UNUSED LPDWORD lpReserved, + WINPR_ATTR_UNUSED LPDWORD lpcSubKeys, + 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"); return -1; @@ -497,60 +542,67 @@ LONG RegQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDWORD 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"); 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"); return -1; } -LONG RegSaveKeyExW(HKEY hKey, LPCWSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes, - DWORD Flags) +LONG RegSaveKeyExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpFile, + WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes, + WINPR_ATTR_UNUSED DWORD Flags) { WLog_ERR(TAG, "TODO: Implement"); return -1; } -LONG RegSaveKeyExA(HKEY hKey, LPCSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes, - DWORD Flags) +LONG RegSaveKeyExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpFile, + WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSecurityAttributes, + WINPR_ATTR_UNUSED DWORD Flags) { WLog_ERR(TAG, "TODO: Implement"); return -1; } -LONG RegSetKeySecurity(HKEY hKey, SECURITY_INFORMATION SecurityInformation, - PSECURITY_DESCRIPTOR pSecurityDescriptor) +LONG RegSetKeySecurity(WINPR_ATTR_UNUSED HKEY hKey, + WINPR_ATTR_UNUSED SECURITY_INFORMATION SecurityInformation, + WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor) { WLog_ERR(TAG, "TODO: Implement"); return -1; } -LONG RegSetValueExW(HKEY hKey, LPCWSTR lpValueName, DWORD Reserved, DWORD dwType, - const BYTE* lpData, DWORD cbData) +LONG RegSetValueExW(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCWSTR lpValueName, + 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"); return -1; } -LONG RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, const BYTE* lpData, - DWORD cbData) +LONG RegSetValueExA(WINPR_ATTR_UNUSED HKEY hKey, WINPR_ATTR_UNUSED LPCSTR lpValueName, + 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"); 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"); 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"); return -1; diff --git a/winpr/libwinpr/registry/registry_reg.c b/winpr/libwinpr/registry/registry_reg.c index 698210c06..42aa54e57 100644 --- a/winpr/libwinpr/registry/registry_reg.c +++ b/winpr/libwinpr/registry/registry_reg.c @@ -305,7 +305,7 @@ static char* reg_load_peek_next_line(Reg* reg) 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* path = NULL; @@ -430,7 +430,7 @@ static void reg_load(Reg* 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(value); diff --git a/winpr/libwinpr/rpc/rpc.c b/winpr/libwinpr/rpc/rpc.c index 57bffef41..a11335e57 100644 --- a/winpr/libwinpr/rpc/rpc.c +++ b/winpr/libwinpr/rpc/rpc.c @@ -28,117 +28,142 @@ #include "../log.h" #define TAG WINPR_TAG("rpc") -RPC_STATUS RpcBindingCopy(RPC_BINDING_HANDLE SourceBinding, RPC_BINDING_HANDLE* DestinationBinding) +RPC_STATUS RpcBindingCopy(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE SourceBinding, + WINPR_ATTR_UNUSED RPC_BINDING_HANDLE* DestinationBinding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingFree(RPC_BINDING_HANDLE* Binding) +RPC_STATUS RpcBindingFree(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE* Binding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingSetOption(RPC_BINDING_HANDLE hBinding, unsigned long option, - ULONG_PTR optionValue) +RPC_STATUS RpcBindingSetOption(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE hBinding, + WINPR_ATTR_UNUSED unsigned long option, + WINPR_ATTR_UNUSED ULONG_PTR optionValue) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingInqOption(RPC_BINDING_HANDLE hBinding, unsigned long option, - ULONG_PTR* pOptionValue) +RPC_STATUS RpcBindingInqOption(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE hBinding, + WINPR_ATTR_UNUSED unsigned long option, + WINPR_ATTR_UNUSED ULONG_PTR* pOptionValue) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingFromStringBindingA(RPC_CSTR StringBinding, RPC_BINDING_HANDLE* Binding) +RPC_STATUS RpcBindingFromStringBindingA(WINPR_ATTR_UNUSED RPC_CSTR StringBinding, + WINPR_ATTR_UNUSED RPC_BINDING_HANDLE* Binding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE* Binding) +RPC_STATUS RpcBindingFromStringBindingW(WINPR_ATTR_UNUSED RPC_WSTR StringBinding, + WINPR_ATTR_UNUSED RPC_BINDING_HANDLE* Binding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcSsGetContextBinding(void* ContextHandle, RPC_BINDING_HANDLE* Binding) +RPC_STATUS RpcSsGetContextBinding(WINPR_ATTR_UNUSED void* ContextHandle, + WINPR_ATTR_UNUSED RPC_BINDING_HANDLE* Binding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingInqObject(RPC_BINDING_HANDLE Binding, UUID* ObjectUuid) +RPC_STATUS RpcBindingInqObject(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED UUID* ObjectUuid) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingReset(RPC_BINDING_HANDLE Binding) +RPC_STATUS RpcBindingReset(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingSetObject(RPC_BINDING_HANDLE Binding, UUID* ObjectUuid) +RPC_STATUS RpcBindingSetObject(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED UUID* ObjectUuid) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtInqDefaultProtectLevel(unsigned long AuthnSvc, unsigned long* AuthnLevel) +RPC_STATUS RpcMgmtInqDefaultProtectLevel(WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED unsigned long* AuthnLevel) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingToStringBindingA(RPC_BINDING_HANDLE Binding, RPC_CSTR* StringBinding) +RPC_STATUS RpcBindingToStringBindingA(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_CSTR* StringBinding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingToStringBindingW(RPC_BINDING_HANDLE Binding, RPC_WSTR* StringBinding) +RPC_STATUS RpcBindingToStringBindingW(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_WSTR* StringBinding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingVectorFree(RPC_BINDING_VECTOR** BindingVector) +RPC_STATUS RpcBindingVectorFree(WINPR_ATTR_UNUSED RPC_BINDING_VECTOR** BindingVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcStringBindingComposeA(RPC_CSTR ObjUuid, RPC_CSTR Protseq, RPC_CSTR NetworkAddr, - RPC_CSTR Endpoint, RPC_CSTR Options, RPC_CSTR* StringBinding) +RPC_STATUS RpcStringBindingComposeA(WINPR_ATTR_UNUSED RPC_CSTR ObjUuid, + WINPR_ATTR_UNUSED RPC_CSTR Protseq, + WINPR_ATTR_UNUSED RPC_CSTR NetworkAddr, + WINPR_ATTR_UNUSED RPC_CSTR Endpoint, + WINPR_ATTR_UNUSED RPC_CSTR Options, + WINPR_ATTR_UNUSED RPC_CSTR* StringBinding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, - RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR* StringBinding) +RPC_STATUS RpcStringBindingComposeW(WINPR_ATTR_UNUSED RPC_WSTR ObjUuid, + WINPR_ATTR_UNUSED RPC_WSTR Protseq, + WINPR_ATTR_UNUSED RPC_WSTR NetworkAddr, + WINPR_ATTR_UNUSED RPC_WSTR Endpoint, + WINPR_ATTR_UNUSED RPC_WSTR Options, + WINPR_ATTR_UNUSED RPC_WSTR* StringBinding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcStringBindingParseA(RPC_CSTR StringBinding, RPC_CSTR* ObjUuid, RPC_CSTR* Protseq, - RPC_CSTR* NetworkAddr, RPC_CSTR* Endpoint, - RPC_CSTR* NetworkOptions) +RPC_STATUS RpcStringBindingParseA(WINPR_ATTR_UNUSED RPC_CSTR StringBinding, + WINPR_ATTR_UNUSED RPC_CSTR* ObjUuid, + WINPR_ATTR_UNUSED RPC_CSTR* Protseq, + WINPR_ATTR_UNUSED RPC_CSTR* NetworkAddr, + WINPR_ATTR_UNUSED RPC_CSTR* Endpoint, + WINPR_ATTR_UNUSED RPC_CSTR* NetworkOptions) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcStringBindingParseW(RPC_WSTR StringBinding, RPC_WSTR* ObjUuid, RPC_WSTR* Protseq, - RPC_WSTR* NetworkAddr, RPC_WSTR* Endpoint, - RPC_WSTR* NetworkOptions) +RPC_STATUS RpcStringBindingParseW(WINPR_ATTR_UNUSED RPC_WSTR StringBinding, + WINPR_ATTR_UNUSED RPC_WSTR* ObjUuid, + WINPR_ATTR_UNUSED RPC_WSTR* Protseq, + WINPR_ATTR_UNUSED RPC_WSTR* NetworkAddr, + WINPR_ATTR_UNUSED RPC_WSTR* Endpoint, + WINPR_ATTR_UNUSED RPC_WSTR* NetworkOptions) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -160,243 +185,293 @@ RPC_STATUS RpcStringFreeW(RPC_WSTR* String) return RPC_S_OK; } -RPC_STATUS RpcIfInqId(RPC_IF_HANDLE RpcIfHandle, RPC_IF_ID* RpcIfId) +RPC_STATUS RpcIfInqId(WINPR_ATTR_UNUSED RPC_IF_HANDLE RpcIfHandle, + WINPR_ATTR_UNUSED RPC_IF_ID* RpcIfId) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcNetworkIsProtseqValidA(RPC_CSTR Protseq) +RPC_STATUS RpcNetworkIsProtseqValidA(WINPR_ATTR_UNUSED RPC_CSTR Protseq) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcNetworkIsProtseqValidW(RPC_WSTR Protseq) +RPC_STATUS RpcNetworkIsProtseqValidW(WINPR_ATTR_UNUSED RPC_WSTR Protseq) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtInqComTimeout(RPC_BINDING_HANDLE Binding, unsigned int* Timeout) +RPC_STATUS RpcMgmtInqComTimeout(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED unsigned int* Timeout) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtSetComTimeout(RPC_BINDING_HANDLE Binding, unsigned int Timeout) +RPC_STATUS RpcMgmtSetComTimeout(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED unsigned int Timeout) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtSetCancelTimeout(long Timeout) +RPC_STATUS RpcMgmtSetCancelTimeout(WINPR_ATTR_UNUSED long Timeout) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcNetworkInqProtseqsA(RPC_PROTSEQ_VECTORA** ProtseqVector) +RPC_STATUS RpcNetworkInqProtseqsA(WINPR_ATTR_UNUSED RPC_PROTSEQ_VECTORA** ProtseqVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcNetworkInqProtseqsW(RPC_PROTSEQ_VECTORW** ProtseqVector) +RPC_STATUS RpcNetworkInqProtseqsW(WINPR_ATTR_UNUSED RPC_PROTSEQ_VECTORW** ProtseqVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcObjectInqType(UUID* ObjUuid, UUID* TypeUuid) +RPC_STATUS RpcObjectInqType(WINPR_ATTR_UNUSED UUID* ObjUuid, WINPR_ATTR_UNUSED UUID* TypeUuid) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcObjectSetInqFn(RPC_OBJECT_INQ_FN* InquiryFn) +RPC_STATUS RpcObjectSetInqFn(WINPR_ATTR_UNUSED RPC_OBJECT_INQ_FN* InquiryFn) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcObjectSetType(UUID* ObjUuid, UUID* TypeUuid) +RPC_STATUS RpcObjectSetType(WINPR_ATTR_UNUSED UUID* ObjUuid, WINPR_ATTR_UNUSED UUID* TypeUuid) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcProtseqVectorFreeA(RPC_PROTSEQ_VECTORA** ProtseqVector) +RPC_STATUS RpcProtseqVectorFreeA(WINPR_ATTR_UNUSED RPC_PROTSEQ_VECTORA** ProtseqVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcProtseqVectorFreeW(RPC_PROTSEQ_VECTORW** ProtseqVector) +RPC_STATUS RpcProtseqVectorFreeW(WINPR_ATTR_UNUSED RPC_PROTSEQ_VECTORW** ProtseqVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerInqBindings(RPC_BINDING_VECTOR** BindingVector) +RPC_STATUS RpcServerInqBindings(WINPR_ATTR_UNUSED RPC_BINDING_VECTOR** BindingVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerInqIf(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV** MgrEpv) +RPC_STATUS RpcServerInqIf(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED UUID* MgrTypeUuid, + WINPR_ATTR_UNUSED RPC_MGR_EPV** MgrEpv) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerListen(unsigned int MinimumCallThreads, unsigned int MaxCalls, - unsigned int DontWait) +RPC_STATUS RpcServerListen(WINPR_ATTR_UNUSED unsigned int MinimumCallThreads, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED unsigned int DontWait) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv) +RPC_STATUS RpcServerRegisterIf(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED UUID* MgrTypeUuid, + WINPR_ATTR_UNUSED RPC_MGR_EPV* MgrEpv) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerRegisterIfEx(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv, - unsigned int Flags, unsigned int MaxCalls, - RPC_IF_CALLBACK_FN* IfCallback) +RPC_STATUS RpcServerRegisterIfEx(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED UUID* MgrTypeUuid, + WINPR_ATTR_UNUSED RPC_MGR_EPV* MgrEpv, + WINPR_ATTR_UNUSED unsigned int Flags, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_IF_CALLBACK_FN* IfCallback) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerRegisterIf2(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv, - unsigned int Flags, unsigned int MaxCalls, unsigned int MaxRpcSize, - RPC_IF_CALLBACK_FN* IfCallbackFn) +RPC_STATUS RpcServerRegisterIf2(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED UUID* MgrTypeUuid, + WINPR_ATTR_UNUSED RPC_MGR_EPV* MgrEpv, + WINPR_ATTR_UNUSED unsigned int Flags, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED unsigned int MaxRpcSize, + WINPR_ATTR_UNUSED RPC_IF_CALLBACK_FN* IfCallbackFn) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUnregisterIf(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, - unsigned int WaitForCallsToComplete) +RPC_STATUS RpcServerUnregisterIf(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED UUID* MgrTypeUuid, + WINPR_ATTR_UNUSED unsigned int WaitForCallsToComplete) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUnregisterIfEx(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, - int RundownContextHandles) +RPC_STATUS RpcServerUnregisterIfEx(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED UUID* MgrTypeUuid, + WINPR_ATTR_UNUSED int RundownContextHandles) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseAllProtseqs(unsigned int MaxCalls, void* SecurityDescriptor) +RPC_STATUS RpcServerUseAllProtseqs(WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED void* SecurityDescriptor) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseAllProtseqsEx(unsigned int MaxCalls, void* SecurityDescriptor, - PRPC_POLICY Policy) +RPC_STATUS RpcServerUseAllProtseqsEx(WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED void* SecurityDescriptor, + WINPR_ATTR_UNUSED PRPC_POLICY Policy) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseAllProtseqsIf(unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, - void* SecurityDescriptor) +RPC_STATUS RpcServerUseAllProtseqsIf(WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED void* SecurityDescriptor) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseAllProtseqsIfEx(unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, - void* SecurityDescriptor, PRPC_POLICY Policy) +RPC_STATUS RpcServerUseAllProtseqsIfEx(WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED void* SecurityDescriptor, + WINPR_ATTR_UNUSED PRPC_POLICY Policy) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqA(RPC_CSTR Protseq, unsigned int MaxCalls, void* SecurityDescriptor) +RPC_STATUS RpcServerUseProtseqA(WINPR_ATTR_UNUSED RPC_CSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED void* SecurityDescriptor) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqExA(RPC_CSTR Protseq, unsigned int MaxCalls, void* SecurityDescriptor, - PRPC_POLICY Policy) +RPC_STATUS RpcServerUseProtseqExA(WINPR_ATTR_UNUSED RPC_CSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED void* SecurityDescriptor, + WINPR_ATTR_UNUSED PRPC_POLICY Policy) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqW(RPC_WSTR Protseq, unsigned int MaxCalls, void* SecurityDescriptor) +RPC_STATUS RpcServerUseProtseqW(WINPR_ATTR_UNUSED RPC_WSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED void* SecurityDescriptor) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqExW(RPC_WSTR Protseq, unsigned int MaxCalls, void* SecurityDescriptor, - PRPC_POLICY Policy) +RPC_STATUS RpcServerUseProtseqExW(WINPR_ATTR_UNUSED RPC_WSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED void* SecurityDescriptor, + WINPR_ATTR_UNUSED PRPC_POLICY Policy) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqEpA(RPC_CSTR Protseq, unsigned int MaxCalls, RPC_CSTR Endpoint, - void* SecurityDescriptor) +RPC_STATUS RpcServerUseProtseqEpA(WINPR_ATTR_UNUSED RPC_CSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_CSTR Endpoint, + WINPR_ATTR_UNUSED void* SecurityDescriptor) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqEpExA(RPC_CSTR Protseq, unsigned int MaxCalls, RPC_CSTR Endpoint, - void* SecurityDescriptor, PRPC_POLICY Policy) +RPC_STATUS RpcServerUseProtseqEpExA(WINPR_ATTR_UNUSED RPC_CSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_CSTR Endpoint, + WINPR_ATTR_UNUSED void* SecurityDescriptor, + WINPR_ATTR_UNUSED PRPC_POLICY Policy) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqEpW(RPC_WSTR Protseq, unsigned int MaxCalls, RPC_WSTR Endpoint, - void* SecurityDescriptor) +RPC_STATUS RpcServerUseProtseqEpW(WINPR_ATTR_UNUSED RPC_WSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_WSTR Endpoint, + WINPR_ATTR_UNUSED void* SecurityDescriptor) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqEpExW(RPC_WSTR Protseq, unsigned int MaxCalls, RPC_WSTR Endpoint, - void* SecurityDescriptor, PRPC_POLICY Policy) +RPC_STATUS RpcServerUseProtseqEpExW(WINPR_ATTR_UNUSED RPC_WSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_WSTR Endpoint, + WINPR_ATTR_UNUSED void* SecurityDescriptor, + WINPR_ATTR_UNUSED PRPC_POLICY Policy) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqIfA(RPC_CSTR Protseq, unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, - void* SecurityDescriptor) +RPC_STATUS RpcServerUseProtseqIfA(WINPR_ATTR_UNUSED RPC_CSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED void* SecurityDescriptor) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqIfExA(RPC_CSTR Protseq, unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, - void* SecurityDescriptor, PRPC_POLICY Policy) +RPC_STATUS RpcServerUseProtseqIfExA(WINPR_ATTR_UNUSED RPC_CSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED void* SecurityDescriptor, + WINPR_ATTR_UNUSED PRPC_POLICY Policy) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqIfW(RPC_WSTR Protseq, unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, - void* SecurityDescriptor) +RPC_STATUS RpcServerUseProtseqIfW(WINPR_ATTR_UNUSED RPC_WSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED void* SecurityDescriptor) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerUseProtseqIfExW(RPC_WSTR Protseq, unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, - void* SecurityDescriptor, PRPC_POLICY Policy) +RPC_STATUS RpcServerUseProtseqIfExW(WINPR_ATTR_UNUSED RPC_WSTR Protseq, + WINPR_ATTR_UNUSED unsigned int MaxCalls, + WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED void* SecurityDescriptor, + WINPR_ATTR_UNUSED PRPC_POLICY Policy) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -407,25 +482,26 @@ void RpcServerYield(void) WLog_ERR(TAG, "Not implemented"); } -RPC_STATUS RpcMgmtStatsVectorFree(RPC_STATS_VECTOR** StatsVector) +RPC_STATUS RpcMgmtStatsVectorFree(WINPR_ATTR_UNUSED RPC_STATS_VECTOR** StatsVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtInqStats(RPC_BINDING_HANDLE Binding, RPC_STATS_VECTOR** Statistics) +RPC_STATUS RpcMgmtInqStats(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_STATS_VECTOR** Statistics) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtIsServerListening(RPC_BINDING_HANDLE Binding) +RPC_STATUS RpcMgmtIsServerListening(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtStopServerListening(RPC_BINDING_HANDLE Binding) +RPC_STATUS RpcMgmtStopServerListening(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -437,7 +513,7 @@ RPC_STATUS RpcMgmtWaitServerListen(void) return 0; } -RPC_STATUS RpcMgmtSetServerStackSize(unsigned long ThreadStackSize) +RPC_STATUS RpcMgmtSetServerStackSize(WINPR_ATTR_UNUSED unsigned long ThreadStackSize) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -454,71 +530,79 @@ RPC_STATUS RpcMgmtEnableIdleCleanup(void) return 0; } -RPC_STATUS RpcMgmtInqIfIds(RPC_BINDING_HANDLE Binding, RPC_IF_ID_VECTOR** IfIdVector) +RPC_STATUS RpcMgmtInqIfIds(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_IF_ID_VECTOR** IfIdVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcIfIdVectorFree(RPC_IF_ID_VECTOR** IfIdVector) +RPC_STATUS RpcIfIdVectorFree(WINPR_ATTR_UNUSED RPC_IF_ID_VECTOR** IfIdVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtInqServerPrincNameA(RPC_BINDING_HANDLE Binding, unsigned long AuthnSvc, - RPC_CSTR* ServerPrincName) +RPC_STATUS RpcMgmtInqServerPrincNameA(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_CSTR* ServerPrincName) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtInqServerPrincNameW(RPC_BINDING_HANDLE Binding, unsigned long AuthnSvc, - RPC_WSTR* ServerPrincName) +RPC_STATUS RpcMgmtInqServerPrincNameW(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_WSTR* ServerPrincName) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerInqDefaultPrincNameA(unsigned long AuthnSvc, RPC_CSTR* PrincName) +RPC_STATUS RpcServerInqDefaultPrincNameA(WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_CSTR* PrincName) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerInqDefaultPrincNameW(unsigned long AuthnSvc, RPC_WSTR* PrincName) +RPC_STATUS RpcServerInqDefaultPrincNameW(WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_WSTR* PrincName) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcEpResolveBinding(RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE IfSpec) +RPC_STATUS RpcEpResolveBinding(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcNsBindingInqEntryNameA(RPC_BINDING_HANDLE Binding, unsigned long EntryNameSyntax, - RPC_CSTR* EntryName) +RPC_STATUS RpcNsBindingInqEntryNameA(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED unsigned long EntryNameSyntax, + WINPR_ATTR_UNUSED RPC_CSTR* EntryName) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcNsBindingInqEntryNameW(RPC_BINDING_HANDLE Binding, unsigned long EntryNameSyntax, - RPC_WSTR* EntryName) +RPC_STATUS RpcNsBindingInqEntryNameW(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED unsigned long EntryNameSyntax, + WINPR_ATTR_UNUSED RPC_WSTR* EntryName) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle) +RPC_STATUS RpcImpersonateClient(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE BindingHandle) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcRevertToSelfEx(RPC_BINDING_HANDLE BindingHandle) +RPC_STATUS RpcRevertToSelfEx(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE BindingHandle) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -530,124 +614,166 @@ RPC_STATUS RpcRevertToSelf(void) return 0; } -RPC_STATUS RpcBindingInqAuthClientA(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE* Privs, - RPC_CSTR* ServerPrincName, unsigned long* AuthnLevel, - unsigned long* AuthnSvc, unsigned long* AuthzSvc) +RPC_STATUS RpcBindingInqAuthClientA(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE ClientBinding, + WINPR_ATTR_UNUSED RPC_AUTHZ_HANDLE* Privs, + WINPR_ATTR_UNUSED RPC_CSTR* ServerPrincName, + WINPR_ATTR_UNUSED unsigned long* AuthnLevel, + WINPR_ATTR_UNUSED unsigned long* AuthnSvc, + WINPR_ATTR_UNUSED unsigned long* AuthzSvc) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingInqAuthClientW(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE* Privs, - RPC_WSTR* ServerPrincName, unsigned long* AuthnLevel, - unsigned long* AuthnSvc, unsigned long* AuthzSvc) +RPC_STATUS RpcBindingInqAuthClientW(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE ClientBinding, + WINPR_ATTR_UNUSED RPC_AUTHZ_HANDLE* Privs, + WINPR_ATTR_UNUSED RPC_WSTR* ServerPrincName, + WINPR_ATTR_UNUSED unsigned long* AuthnLevel, + WINPR_ATTR_UNUSED unsigned long* AuthnSvc, + WINPR_ATTR_UNUSED unsigned long* AuthzSvc) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingInqAuthClientExA(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE* Privs, - RPC_CSTR* ServerPrincName, unsigned long* AuthnLevel, - unsigned long* AuthnSvc, unsigned long* AuthzSvc, - unsigned long Flags) +RPC_STATUS RpcBindingInqAuthClientExA(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE ClientBinding, + WINPR_ATTR_UNUSED RPC_AUTHZ_HANDLE* Privs, + WINPR_ATTR_UNUSED RPC_CSTR* ServerPrincName, + WINPR_ATTR_UNUSED unsigned long* AuthnLevel, + WINPR_ATTR_UNUSED unsigned long* AuthnSvc, + WINPR_ATTR_UNUSED unsigned long* AuthzSvc, + WINPR_ATTR_UNUSED unsigned long Flags) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingInqAuthClientExW(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE* Privs, - RPC_WSTR* ServerPrincName, unsigned long* AuthnLevel, - unsigned long* AuthnSvc, unsigned long* AuthzSvc, - unsigned long Flags) +RPC_STATUS RpcBindingInqAuthClientExW(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE ClientBinding, + WINPR_ATTR_UNUSED RPC_AUTHZ_HANDLE* Privs, + WINPR_ATTR_UNUSED RPC_WSTR* ServerPrincName, + WINPR_ATTR_UNUSED unsigned long* AuthnLevel, + WINPR_ATTR_UNUSED unsigned long* AuthnSvc, + WINPR_ATTR_UNUSED unsigned long* AuthzSvc, + WINPR_ATTR_UNUSED unsigned long Flags) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingInqAuthInfoA(RPC_BINDING_HANDLE Binding, RPC_CSTR* ServerPrincName, - unsigned long* AuthnLevel, unsigned long* AuthnSvc, - RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, unsigned long* AuthzSvc) +RPC_STATUS RpcBindingInqAuthInfoA(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_CSTR* ServerPrincName, + WINPR_ATTR_UNUSED unsigned long* AuthnLevel, + WINPR_ATTR_UNUSED unsigned long* AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, + WINPR_ATTR_UNUSED unsigned long* AuthzSvc) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingInqAuthInfoW(RPC_BINDING_HANDLE Binding, RPC_WSTR* ServerPrincName, - unsigned long* AuthnLevel, unsigned long* AuthnSvc, - RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, unsigned long* AuthzSvc) +RPC_STATUS RpcBindingInqAuthInfoW(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_WSTR* ServerPrincName, + WINPR_ATTR_UNUSED unsigned long* AuthnLevel, + WINPR_ATTR_UNUSED unsigned long* AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, + WINPR_ATTR_UNUSED unsigned long* AuthzSvc) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingSetAuthInfoA(RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, - unsigned long AuthnLevel, unsigned long AuthnSvc, - RPC_AUTH_IDENTITY_HANDLE AuthIdentity, unsigned long AuthzSvc) +RPC_STATUS RpcBindingSetAuthInfoA(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_CSTR ServerPrincName, + WINPR_ATTR_UNUSED unsigned long AuthnLevel, + WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_IDENTITY_HANDLE AuthIdentity, + WINPR_ATTR_UNUSED unsigned long AuthzSvc) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingSetAuthInfoExA(RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, - unsigned long AuthnLevel, unsigned long AuthnSvc, - RPC_AUTH_IDENTITY_HANDLE AuthIdentity, unsigned long AuthzSvc, - RPC_SECURITY_QOS* SecurityQos) +RPC_STATUS RpcBindingSetAuthInfoExA(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_CSTR ServerPrincName, + WINPR_ATTR_UNUSED unsigned long AuthnLevel, + WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_IDENTITY_HANDLE AuthIdentity, + WINPR_ATTR_UNUSED unsigned long AuthzSvc, + WINPR_ATTR_UNUSED RPC_SECURITY_QOS* SecurityQos) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingSetAuthInfoW(RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, - unsigned long AuthnLevel, unsigned long AuthnSvc, - RPC_AUTH_IDENTITY_HANDLE AuthIdentity, unsigned long AuthzSvc) +RPC_STATUS RpcBindingSetAuthInfoW(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_WSTR ServerPrincName, + WINPR_ATTR_UNUSED unsigned long AuthnLevel, + WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_IDENTITY_HANDLE AuthIdentity, + WINPR_ATTR_UNUSED unsigned long AuthzSvc) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingSetAuthInfoExW(RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, - unsigned long AuthnLevel, unsigned long AuthnSvc, - RPC_AUTH_IDENTITY_HANDLE AuthIdentity, unsigned long AuthzSvc, - RPC_SECURITY_QOS* SecurityQOS) +RPC_STATUS RpcBindingSetAuthInfoExW(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_WSTR ServerPrincName, + WINPR_ATTR_UNUSED unsigned long AuthnLevel, + WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_IDENTITY_HANDLE AuthIdentity, + WINPR_ATTR_UNUSED unsigned long AuthzSvc, + WINPR_ATTR_UNUSED RPC_SECURITY_QOS* SecurityQOS) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingInqAuthInfoExA(RPC_BINDING_HANDLE Binding, RPC_CSTR* ServerPrincName, - unsigned long* AuthnLevel, unsigned long* AuthnSvc, - RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, unsigned long* AuthzSvc, - unsigned long RpcQosVersion, RPC_SECURITY_QOS* SecurityQOS) +RPC_STATUS RpcBindingInqAuthInfoExA(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_CSTR* ServerPrincName, + WINPR_ATTR_UNUSED unsigned long* AuthnLevel, + WINPR_ATTR_UNUSED unsigned long* AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, + WINPR_ATTR_UNUSED unsigned long* AuthzSvc, + WINPR_ATTR_UNUSED unsigned long RpcQosVersion, + WINPR_ATTR_UNUSED RPC_SECURITY_QOS* SecurityQOS) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingInqAuthInfoExW(RPC_BINDING_HANDLE Binding, RPC_WSTR* ServerPrincName, - unsigned long* AuthnLevel, unsigned long* AuthnSvc, - RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, unsigned long* AuthzSvc, - unsigned long RpcQosVersion, RPC_SECURITY_QOS* SecurityQOS) +RPC_STATUS RpcBindingInqAuthInfoExW(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED RPC_WSTR* ServerPrincName, + WINPR_ATTR_UNUSED unsigned long* AuthnLevel, + WINPR_ATTR_UNUSED unsigned long* AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, + WINPR_ATTR_UNUSED unsigned long* AuthzSvc, + WINPR_ATTR_UNUSED unsigned long RpcQosVersion, + WINPR_ATTR_UNUSED RPC_SECURITY_QOS* SecurityQOS) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerRegisterAuthInfoA(RPC_CSTR ServerPrincName, unsigned long AuthnSvc, - RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, void* Arg) +RPC_STATUS RpcServerRegisterAuthInfoA(WINPR_ATTR_UNUSED RPC_CSTR ServerPrincName, + WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, + WINPR_ATTR_UNUSED void* Arg) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerRegisterAuthInfoW(RPC_WSTR ServerPrincName, unsigned long AuthnSvc, - RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, void* Arg) +RPC_STATUS RpcServerRegisterAuthInfoW(WINPR_ATTR_UNUSED RPC_WSTR ServerPrincName, + WINPR_ATTR_UNUSED unsigned long AuthnSvc, + WINPR_ATTR_UNUSED RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, + WINPR_ATTR_UNUSED void* Arg) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcBindingServerFromClient(RPC_BINDING_HANDLE ClientBinding, - RPC_BINDING_HANDLE* ServerBinding) +RPC_STATUS RpcBindingServerFromClient(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE ClientBinding, + WINPR_ATTR_UNUSED RPC_BINDING_HANDLE* ServerBinding) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -666,19 +792,19 @@ RPC_STATUS RpcTestCancel(void) return 0; } -RPC_STATUS RpcServerTestCancel(RPC_BINDING_HANDLE BindingHandle) +RPC_STATUS RpcServerTestCancel(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE BindingHandle) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcCancelThread(void* Thread) +RPC_STATUS RpcCancelThread(WINPR_ATTR_UNUSED void* Thread) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcCancelThreadEx(void* Thread, long Timeout) +RPC_STATUS RpcCancelThreadEx(WINPR_ATTR_UNUSED void* Thread, WINPR_ATTR_UNUSED long Timeout) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -725,7 +851,7 @@ RPC_STATUS UuidToStringA(const UUID* Uuid, RPC_CSTR* StringUuid) return RPC_S_OK; } -RPC_STATUS UuidToStringW(const UUID* Uuid, RPC_WSTR* StringUuid) +RPC_STATUS UuidToStringW(WINPR_ATTR_UNUSED const UUID* Uuid, WINPR_ATTR_UNUSED RPC_WSTR* StringUuid) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -778,7 +904,7 @@ RPC_STATUS UuidFromStringA(RPC_CSTR StringUuid, UUID* Uuid) return RPC_S_OK; } -RPC_STATUS UuidFromStringW(RPC_WSTR StringUuid, UUID* Uuid) +RPC_STATUS UuidFromStringW(WINPR_ATTR_UNUSED RPC_WSTR StringUuid, WINPR_ATTR_UNUSED UUID* Uuid) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -823,7 +949,7 @@ int UuidEqual(const UUID* Uuid1, const UUID* Uuid2, RPC_STATUS* Status) return ((UuidCompare(Uuid1, Uuid2, Status) == 0) ? TRUE : FALSE); } -unsigned short UuidHash(const UUID* Uuid, RPC_STATUS* Status) +unsigned short UuidHash(WINPR_ATTR_UNUSED const UUID* Uuid, WINPR_ATTR_UNUSED RPC_STATUS* Status) { WLog_ERR(TAG, "Not implemented"); return 0; @@ -834,95 +960,117 @@ int UuidIsNil(const UUID* Uuid, RPC_STATUS* Status) return UuidEqual(Uuid, &UUID_NIL, Status); } -RPC_STATUS RpcEpRegisterNoReplaceA(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, - UUID_VECTOR* UuidVector, RPC_CSTR Annotation) +RPC_STATUS RpcEpRegisterNoReplaceA(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED RPC_BINDING_VECTOR* BindingVector, + WINPR_ATTR_UNUSED UUID_VECTOR* UuidVector, + WINPR_ATTR_UNUSED RPC_CSTR Annotation) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcEpRegisterNoReplaceW(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, - UUID_VECTOR* UuidVector, RPC_WSTR Annotation) +RPC_STATUS RpcEpRegisterNoReplaceW(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED RPC_BINDING_VECTOR* BindingVector, + WINPR_ATTR_UNUSED UUID_VECTOR* UuidVector, + WINPR_ATTR_UNUSED RPC_WSTR Annotation) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcEpRegisterA(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, - UUID_VECTOR* UuidVector, RPC_CSTR Annotation) +RPC_STATUS RpcEpRegisterA(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED RPC_BINDING_VECTOR* BindingVector, + WINPR_ATTR_UNUSED UUID_VECTOR* UuidVector, + WINPR_ATTR_UNUSED RPC_CSTR Annotation) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcEpRegisterW(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, - UUID_VECTOR* UuidVector, RPC_WSTR Annotation) +RPC_STATUS RpcEpRegisterW(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED RPC_BINDING_VECTOR* BindingVector, + WINPR_ATTR_UNUSED UUID_VECTOR* UuidVector, + WINPR_ATTR_UNUSED RPC_WSTR Annotation) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcEpUnregister(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, - UUID_VECTOR* UuidVector) +RPC_STATUS RpcEpUnregister(WINPR_ATTR_UNUSED RPC_IF_HANDLE IfSpec, + WINPR_ATTR_UNUSED RPC_BINDING_VECTOR* BindingVector, + WINPR_ATTR_UNUSED UUID_VECTOR* UuidVector) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS DceErrorInqTextA(RPC_STATUS RpcStatus, RPC_CSTR ErrorText) +RPC_STATUS DceErrorInqTextA(WINPR_ATTR_UNUSED RPC_STATUS RpcStatus, + WINPR_ATTR_UNUSED RPC_CSTR ErrorText) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS DceErrorInqTextW(RPC_STATUS RpcStatus, RPC_WSTR ErrorText) +RPC_STATUS DceErrorInqTextW(WINPR_ATTR_UNUSED RPC_STATUS RpcStatus, + WINPR_ATTR_UNUSED RPC_WSTR ErrorText) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtEpEltInqBegin(RPC_BINDING_HANDLE EpBinding, unsigned long InquiryType, - RPC_IF_ID* IfId, unsigned long VersOption, UUID* ObjectUuid, - RPC_EP_INQ_HANDLE* InquiryContext) +RPC_STATUS RpcMgmtEpEltInqBegin(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE EpBinding, + WINPR_ATTR_UNUSED unsigned long InquiryType, + WINPR_ATTR_UNUSED RPC_IF_ID* IfId, + WINPR_ATTR_UNUSED unsigned long VersOption, + WINPR_ATTR_UNUSED UUID* ObjectUuid, + WINPR_ATTR_UNUSED RPC_EP_INQ_HANDLE* InquiryContext) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtEpEltInqDone(RPC_EP_INQ_HANDLE* InquiryContext) +RPC_STATUS RpcMgmtEpEltInqDone(WINPR_ATTR_UNUSED RPC_EP_INQ_HANDLE* InquiryContext) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtEpEltInqNextA(RPC_EP_INQ_HANDLE InquiryContext, RPC_IF_ID* IfId, - RPC_BINDING_HANDLE* Binding, UUID* ObjectUuid, RPC_CSTR* Annotation) +RPC_STATUS RpcMgmtEpEltInqNextA(WINPR_ATTR_UNUSED RPC_EP_INQ_HANDLE InquiryContext, + WINPR_ATTR_UNUSED RPC_IF_ID* IfId, + WINPR_ATTR_UNUSED RPC_BINDING_HANDLE* Binding, + WINPR_ATTR_UNUSED UUID* ObjectUuid, + WINPR_ATTR_UNUSED RPC_CSTR* Annotation) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtEpEltInqNextW(RPC_EP_INQ_HANDLE InquiryContext, RPC_IF_ID* IfId, - RPC_BINDING_HANDLE* Binding, UUID* ObjectUuid, RPC_WSTR* Annotation) +RPC_STATUS RpcMgmtEpEltInqNextW(WINPR_ATTR_UNUSED RPC_EP_INQ_HANDLE InquiryContext, + WINPR_ATTR_UNUSED RPC_IF_ID* IfId, + WINPR_ATTR_UNUSED RPC_BINDING_HANDLE* Binding, + WINPR_ATTR_UNUSED UUID* ObjectUuid, + WINPR_ATTR_UNUSED RPC_WSTR* Annotation) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtEpUnregister(RPC_BINDING_HANDLE EpBinding, RPC_IF_ID* IfId, - RPC_BINDING_HANDLE Binding, UUID* ObjectUuid) +RPC_STATUS RpcMgmtEpUnregister(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE EpBinding, + WINPR_ATTR_UNUSED RPC_IF_ID* IfId, + WINPR_ATTR_UNUSED RPC_BINDING_HANDLE Binding, + WINPR_ATTR_UNUSED UUID* ObjectUuid) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN AuthorizationFn) +RPC_STATUS RpcMgmtSetAuthorizationFn(WINPR_ATTR_UNUSED RPC_MGMT_AUTHORIZATION_FN AuthorizationFn) { WLog_ERR(TAG, "Not implemented"); return 0; } -RPC_STATUS RpcServerInqBindingHandle(RPC_BINDING_HANDLE* Binding) +RPC_STATUS RpcServerInqBindingHandle(WINPR_ATTR_UNUSED RPC_BINDING_HANDLE* Binding) { WLog_ERR(TAG, "Not implemented"); return 0; diff --git a/winpr/libwinpr/security/security.c b/winpr/libwinpr/security/security.c index 3806233b2..0dfe768eb 100644 --- a/winpr/libwinpr/security/security.c +++ b/winpr/libwinpr/security/security.c @@ -122,92 +122,122 @@ */ #ifndef _WIN32 - +#include #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; } -DWORD GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor) +DWORD GetSecurityDescriptorLength(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor) { + WLog_ERR("TODO", "TODO: Implement"); return 0; } -BOOL IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor) +BOOL IsValidSecurityDescriptor(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, - PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision) +BOOL GetSecurityDescriptorControl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR_CONTROL pControl, + WINPR_ATTR_UNUSED LPDWORD lpdwRevision) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, - SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest, - SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet) +BOOL SetSecurityDescriptorControl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED SECURITY_DESCRIPTOR_CONTROL + ControlBitsOfInterest, + WINPR_ATTR_UNUSED SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbDaclPresent, - PACL* pDacl, LPBOOL lpbDaclDefaulted) +BOOL GetSecurityDescriptorDacl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED LPBOOL lpbDaclPresent, + WINPR_ATTR_UNUSED PACL* pDacl, + WINPR_ATTR_UNUSED LPBOOL lpbDaclDefaulted) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, - PACL pDacl, BOOL bDaclDefaulted) +BOOL SetSecurityDescriptorDacl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED BOOL bDaclPresent, WINPR_ATTR_UNUSED PACL pDacl, + WINPR_ATTR_UNUSED BOOL bDaclDefaulted) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID* pGroup, - LPBOOL lpbGroupDefaulted) +BOOL GetSecurityDescriptorGroup(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED PSID* pGroup, + WINPR_ATTR_UNUSED LPBOOL lpbGroupDefaulted) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pGroup, - BOOL bGroupDefaulted) +BOOL SetSecurityDescriptorGroup(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED PSID pGroup, + WINPR_ATTR_UNUSED BOOL bGroupDefaulted) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID* pOwner, - LPBOOL lpbOwnerDefaulted) +BOOL GetSecurityDescriptorOwner(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED PSID* pOwner, + WINPR_ATTR_UNUSED LPBOOL lpbOwnerDefaulted) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pOwner, - BOOL bOwnerDefaulted) +BOOL SetSecurityDescriptorOwner(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED PSID pOwner, + WINPR_ATTR_UNUSED BOOL bOwnerDefaulted) { + WLog_ERR("TODO", "TODO: Implement"); 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; } -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; } -BOOL GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbSaclPresent, - PACL* pSacl, LPBOOL lpbSaclDefaulted) +BOOL GetSecurityDescriptorSacl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED LPBOOL lpbSaclPresent, + WINPR_ATTR_UNUSED PACL* pSacl, + WINPR_ATTR_UNUSED LPBOOL lpbSaclDefaulted) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } -BOOL SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bSaclPresent, - PACL pSacl, BOOL bSaclDefaulted) +BOOL SetSecurityDescriptorSacl(WINPR_ATTR_UNUSED PSECURITY_DESCRIPTOR pSecurityDescriptor, + WINPR_ATTR_UNUSED BOOL bSaclPresent, WINPR_ATTR_UNUSED PACL pSacl, + WINPR_ATTR_UNUSED BOOL bSaclDefaulted) { + WLog_ERR("TODO", "TODO: Implement"); return TRUE; } diff --git a/winpr/libwinpr/smartcard/smartcard.c b/winpr/libwinpr/smartcard/smartcard.c index dc9b0b183..fcd18f580 100644 --- a/winpr/libwinpr/smartcard/smartcard.c +++ b/winpr/libwinpr/smartcard/smartcard.c @@ -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_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 if (Windows_InitializeSCardApi() >= 0) diff --git a/winpr/libwinpr/smartcard/smartcard_pcsc.c b/winpr/libwinpr/smartcard/smartcard_pcsc.c index 03369b2f6..5be218049 100644 --- a/winpr/libwinpr/smartcard/smartcard_pcsc.c +++ b/winpr/libwinpr/smartcard/smartcard_pcsc.c @@ -1062,7 +1062,7 @@ static const char* findCardByAtr(LPCBYTE pbAtr) 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, CHAR* mszCards, LPDWORD pcchCards) { @@ -1115,7 +1115,7 @@ static LONG WINAPI PCSC_SCardListCardsA(SCARDCONTEXT hContext, LPCBYTE pbAtr, 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, WCHAR* mszCards, LPDWORD pcchCards) { diff --git a/winpr/libwinpr/sspi/CredSSP/credssp.c b/winpr/libwinpr/sspi/CredSSP/credssp.c index 558155524..1b53050f8 100644 --- a/winpr/libwinpr/sspi/CredSSP/credssp.c +++ b/winpr/libwinpr/sspi/CredSSP/credssp.c @@ -32,18 +32,24 @@ static const char* CREDSSP_PACKAGE_NAME = "CredSSP"; static SECURITY_STATUS SEC_ENTRY credssp_InitializeSecurityContextW( - PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR* pszTargetName, ULONG fContextReq, - ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, - PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry) + WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED PCtxtHandle phContext, + WINPR_ATTR_UNUSED SEC_WCHAR* pszTargetName, WINPR_ATTR_UNUSED ULONG fContextReq, + 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"); return SEC_E_UNSUPPORTED_FUNCTION; } static SECURITY_STATUS SEC_ENTRY credssp_InitializeSecurityContextA( - PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR* pszTargetName, ULONG fContextReq, - ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, - PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry) + PCredHandle phCredential, PCtxtHandle phContext, WINPR_ATTR_UNUSED SEC_CHAR* pszTargetName, + WINPR_ATTR_UNUSED ULONG fContextReq, WINPR_ATTR_UNUSED ULONG Reserved1, + 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; SSPI_CREDENTIALS* credentials = NULL; @@ -100,7 +106,8 @@ void credssp_ContextFree(CREDSSP_CONTEXT* context) } static SECURITY_STATUS SEC_ENTRY credssp_QueryContextAttributes(PCtxtHandle phContext, - ULONG ulAttribute, void* pBuffer) + WINPR_ATTR_UNUSED ULONG ulAttribute, + void* pBuffer) { if (!phContext) 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( - SEC_WCHAR* pszPrincipal, SEC_WCHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, - void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, - PTimeStamp ptsExpiry) + WINPR_ATTR_UNUSED SEC_WCHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_WCHAR* pszPackage, + WINPR_ATTR_UNUSED ULONG fCredentialUse, WINPR_ATTR_UNUSED void* pvLogonID, + 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"); return SEC_E_UNSUPPORTED_FUNCTION; } static SECURITY_STATUS SEC_ENTRY credssp_AcquireCredentialsHandleA( - SEC_CHAR* pszPrincipal, SEC_CHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, - void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, - PTimeStamp ptsExpiry) + WINPR_ATTR_UNUSED SEC_CHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_CHAR* pszPackage, + WINPR_ATTR_UNUSED ULONG fCredentialUse, WINPR_ATTR_UNUSED void* pvLogonID, + 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; SEC_WINNT_AUTH_IDENTITY* identity = NULL; @@ -154,17 +165,17 @@ static SECURITY_STATUS SEC_ENTRY credssp_AcquireCredentialsHandleA( return SEC_E_UNSUPPORTED_FUNCTION; } -static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesW(PCredHandle phCredential, - ULONG ulAttribute, - void* pBuffer) +static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesW( + WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute, + WINPR_ATTR_UNUSED void* pBuffer) { WLog_ERR(TAG, "TODO: Implement"); return SEC_E_UNSUPPORTED_FUNCTION; } -static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesA(PCredHandle phCredential, - ULONG ulAttribute, - void* pBuffer) +static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesA( + WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute, + WINPR_ATTR_UNUSED void* pBuffer) { if (ulAttribute == SECPKG_CRED_ATTR_NAMES) { @@ -197,31 +208,37 @@ static SECURITY_STATUS SEC_ENTRY credssp_FreeCredentialsHandle(PCredHandle phCre return SEC_E_OK; } -static SECURITY_STATUS SEC_ENTRY credssp_EncryptMessage(PCtxtHandle phContext, ULONG fQOP, - PSecBufferDesc pMessage, ULONG MessageSeqNo) +static SECURITY_STATUS SEC_ENTRY credssp_EncryptMessage(WINPR_ATTR_UNUSED PCtxtHandle phContext, + WINPR_ATTR_UNUSED ULONG fQOP, + WINPR_ATTR_UNUSED PSecBufferDesc pMessage, + WINPR_ATTR_UNUSED ULONG MessageSeqNo) { WLog_ERR(TAG, "TODO: Implement"); return SEC_E_UNSUPPORTED_FUNCTION; } -static SECURITY_STATUS SEC_ENTRY credssp_DecryptMessage(PCtxtHandle phContext, - PSecBufferDesc pMessage, ULONG MessageSeqNo, - ULONG* pfQOP) +static SECURITY_STATUS SEC_ENTRY credssp_DecryptMessage(WINPR_ATTR_UNUSED PCtxtHandle phContext, + WINPR_ATTR_UNUSED PSecBufferDesc pMessage, + WINPR_ATTR_UNUSED ULONG MessageSeqNo, + WINPR_ATTR_UNUSED ULONG* pfQOP) { WLog_ERR(TAG, "TODO: Implement"); return SEC_E_UNSUPPORTED_FUNCTION; } -static SECURITY_STATUS SEC_ENTRY credssp_MakeSignature(PCtxtHandle phContext, ULONG fQOP, - PSecBufferDesc pMessage, ULONG MessageSeqNo) +static SECURITY_STATUS SEC_ENTRY credssp_MakeSignature(WINPR_ATTR_UNUSED PCtxtHandle phContext, + WINPR_ATTR_UNUSED ULONG fQOP, + WINPR_ATTR_UNUSED PSecBufferDesc pMessage, + WINPR_ATTR_UNUSED ULONG MessageSeqNo) { WLog_ERR(TAG, "TODO: Implement"); return SEC_E_UNSUPPORTED_FUNCTION; } -static SECURITY_STATUS SEC_ENTRY credssp_VerifySignature(PCtxtHandle phContext, - PSecBufferDesc pMessage, - ULONG MessageSeqNo, ULONG* pfQOP) +static SECURITY_STATUS SEC_ENTRY credssp_VerifySignature(WINPR_ATTR_UNUSED PCtxtHandle phContext, + WINPR_ATTR_UNUSED PSecBufferDesc pMessage, + WINPR_ATTR_UNUSED ULONG MessageSeqNo, + WINPR_ATTR_UNUSED ULONG* pfQOP) { WLog_ERR(TAG, "TODO: Implement"); return SEC_E_UNSUPPORTED_FUNCTION; diff --git a/winpr/libwinpr/sspi/Kerberos/kerberos.c b/winpr/libwinpr/sspi/Kerberos/kerberos.c index 61e8e4e68..b8dbf21db 100644 --- a/winpr/libwinpr/sspi/Kerberos/kerberos.c +++ b/winpr/libwinpr/sspi/Kerberos/kerberos.c @@ -201,8 +201,10 @@ static KRB_CONTEXT* kerberos_ContextNew(KRB_CREDENTIALS* credentials) return context; } -static krb5_error_code krb5_prompter(krb5_context context, void* data, const char* name, - const char* banner, int num_prompts, krb5_prompt prompts[]) +static krb5_error_code krb5_prompter(krb5_context context, void* data, + 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++) { @@ -268,9 +270,10 @@ fail: #endif /* WITH_KRB5 */ static SECURITY_STATUS SEC_ENTRY kerberos_AcquireCredentialsHandleA( - SEC_CHAR* pszPrincipal, SEC_CHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, - void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, - PTimeStamp ptsExpiry) + SEC_CHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_CHAR* pszPackage, ULONG fCredentialUse, + WINPR_ATTR_UNUSED void* pvLogonID, void* pAuthData, WINPR_ATTR_UNUSED SEC_GET_KEY_FN pGetKeyFn, + WINPR_ATTR_UNUSED void* pvGetKeyArgument, PCredHandle phCredential, + WINPR_ATTR_UNUSED PTimeStamp ptsExpiry) { #ifdef WITH_KRB5 SEC_WINPR_KERBEROS_SETTINGS* krb_settings = NULL; @@ -552,9 +555,8 @@ static SECURITY_STATUS SEC_ENTRY kerberos_FreeCredentialsHandle(PCredHandle phCr #endif } -static SECURITY_STATUS SEC_ENTRY kerberos_QueryCredentialsAttributesW(PCredHandle phCredential, - ULONG ulAttribute, - void* pBuffer) +static SECURITY_STATUS SEC_ENTRY kerberos_QueryCredentialsAttributesW( + WINPR_ATTR_UNUSED PCredHandle phCredential, ULONG ulAttribute, WINPR_ATTR_UNUSED void* pBuffer) { #ifdef WITH_KRB5 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( PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR* pszTargetName, ULONG fContextReq, - ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, - PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG* pfContextAttr, PTimeStamp ptsExpiry) + WINPR_ATTR_UNUSED ULONG Reserved1, WINPR_ATTR_UNUSED ULONG TargetDataRep, PSecBufferDesc pInput, + WINPR_ATTR_UNUSED ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, + WINPR_ATTR_UNUSED ULONG* pfContextAttr, WINPR_ATTR_UNUSED PTimeStamp ptsExpiry) { #ifdef WITH_KRB5 PSecBuffer input_buffer = NULL; @@ -1252,9 +1255,10 @@ static SECURITY_STATUS SEC_ENTRY kerberos_InitializeSecurityContextW( } static SECURITY_STATUS SEC_ENTRY kerberos_AcceptSecurityContext( - PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, - ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG* pfContextAttr, - PTimeStamp ptsExpity) + PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, + WINPR_ATTR_UNUSED ULONG fContextReq, WINPR_ATTR_UNUSED ULONG TargetDataRep, + PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG* pfContextAttr, + WINPR_ATTR_UNUSED PTimeStamp ptsExpity) { #ifdef WITH_KRB5 BOOL isNewContext = FALSE; @@ -1710,16 +1714,16 @@ static SECURITY_STATUS SEC_ENTRY kerberos_QueryContextAttributesW(PCtxtHandle ph return kerberos_QueryContextAttributesA(phContext, ulAttribute, pBuffer); } -static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesW(PCtxtHandle phContext, - ULONG ulAttribute, void* pBuffer, - ULONG cbBuffer) +static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesW( + WINPR_ATTR_UNUSED PCtxtHandle phContext, WINPR_ATTR_UNUSED ULONG ulAttribute, + WINPR_ATTR_UNUSED void* pBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer) { return SEC_E_UNSUPPORTED_FUNCTION; } -static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesA(PCtxtHandle phContext, - ULONG ulAttribute, void* pBuffer, - ULONG cbBuffer) +static SECURITY_STATUS SEC_ENTRY kerberos_SetContextAttributesA( + WINPR_ATTR_UNUSED PCtxtHandle phContext, WINPR_ATTR_UNUSED ULONG ulAttribute, + WINPR_ATTR_UNUSED void* pBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer) { 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, ULONG ulAttribute, void* pBuffer, ULONG cbBuffer, - BOOL unicode) + WINPR_ATTR_UNUSED BOOL unicode) { #ifdef WITH_KRB5 KRB_CREDENTIALS* credentials = NULL; @@ -1998,7 +2002,8 @@ static SECURITY_STATUS SEC_ENTRY kerberos_DecryptMessage(PCtxtHandle phContext, #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) { #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, PSecBufferDesc pMessage, - ULONG MessageSeqNo, ULONG* pfQOP) + ULONG MessageSeqNo, + WINPR_ATTR_UNUSED ULONG* pfQOP) { #ifdef WITH_KRB5 PSecBuffer sig_buffer = NULL; diff --git a/winpr/libwinpr/sspi/NTLM/ntlm.c b/winpr/libwinpr/sspi/NTLM/ntlm.c index a50041172..6f3bbcdad 100644 --- a/winpr/libwinpr/sspi/NTLM/ntlm.c +++ b/winpr/libwinpr/sspi/NTLM/ntlm.c @@ -357,9 +357,10 @@ static void ntlm_ContextFree(NTLM_CONTEXT* context) } static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW( - SEC_WCHAR* pszPrincipal, SEC_WCHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, - void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, - PTimeStamp ptsExpiry) + WINPR_ATTR_UNUSED SEC_WCHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_WCHAR* pszPackage, + ULONG fCredentialUse, WINPR_ATTR_UNUSED void* pvLogonID, void* pAuthData, + SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, + WINPR_ATTR_UNUSED PTimeStamp ptsExpiry) { SEC_WINPR_NTLM_SETTINGS* settings = NULL; @@ -457,8 +458,9 @@ static SECURITY_STATUS SEC_ENTRY ntlm_FreeCredentialsHandle(PCredHandle phCreden return SEC_E_OK; } -static SECURITY_STATUS SEC_ENTRY ntlm_QueryCredentialsAttributesW(PCredHandle phCredential, - ULONG ulAttribute, void* pBuffer) +static SECURITY_STATUS SEC_ENTRY ntlm_QueryCredentialsAttributesW( + WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute, + WINPR_ATTR_UNUSED void* pBuffer) { 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 */ -static SECURITY_STATUS SEC_ENTRY -ntlm_AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, - ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, - PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsTimeStamp) +static SECURITY_STATUS SEC_ENTRY ntlm_AcceptSecurityContext( + PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, + WINPR_ATTR_UNUSED ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, + WINPR_ATTR_UNUSED PULONG pfContextAttr, WINPR_ATTR_UNUSED PTimeStamp ptsTimeStamp) { SECURITY_STATUS status = 0; 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; } static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR* pszTargetName, ULONG fContextReq, - ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, - PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry) + WINPR_ATTR_UNUSED ULONG Reserved1, 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; SSPI_CREDENTIALS* credentials = NULL; @@ -1024,26 +1028,27 @@ static SECURITY_STATUS SEC_ENTRY ntlm_SetContextAttributesA(PCtxtHandle phContex return ntlm_SetContextAttributesW(phContext, ulAttribute, pBuffer, cbBuffer); } -static SECURITY_STATUS SEC_ENTRY ntlm_SetCredentialsAttributesW(PCredHandle phCredential, - ULONG ulAttribute, void* pBuffer, - ULONG cbBuffer) +static SECURITY_STATUS SEC_ENTRY ntlm_SetCredentialsAttributesW( + WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute, + WINPR_ATTR_UNUSED void* pBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer) { return SEC_E_UNSUPPORTED_FUNCTION; } -static SECURITY_STATUS SEC_ENTRY ntlm_SetCredentialsAttributesA(PCredHandle phCredential, - ULONG ulAttribute, void* pBuffer, - ULONG cbBuffer) +static SECURITY_STATUS SEC_ENTRY ntlm_SetCredentialsAttributesA( + WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute, + WINPR_ATTR_UNUSED void* pBuffer, WINPR_ATTR_UNUSED ULONG cbBuffer) { 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; } -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) { 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, - ULONG MessageSeqNo, PULONG pfQOP) + ULONG MessageSeqNo, + WINPR_ATTR_UNUSED PULONG pfQOP) { const UINT32 SeqNo = (UINT32)MessageSeqNo; UINT32 value = 0; @@ -1230,7 +1236,8 @@ static SECURITY_STATUS SEC_ENTRY ntlm_DecryptMessage(PCtxtHandle phContext, PSec 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) { 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, PSecBufferDesc pMessage, ULONG MessageSeqNo, - PULONG pfQOP) + WINPR_ATTR_UNUSED PULONG pfQOP) { PSecBuffer data_buffer = NULL; PSecBuffer sig_buffer = NULL; diff --git a/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c b/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c index ef6a232a0..8b97cf2a3 100644 --- a/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c +++ b/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c @@ -323,7 +323,8 @@ static char* get_name(COMPUTER_NAME_FORMAT type) 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; diff --git a/winpr/libwinpr/sspi/NTLM/ntlm_message.c b/winpr/libwinpr/sspi/NTLM/ntlm_message.c index cc06cb610..de941346f 100644 --- a/winpr/libwinpr/sspi/NTLM/ntlm_message.c +++ b/winpr/libwinpr/sspi/NTLM/ntlm_message.c @@ -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, - const char* name) + WINPR_ATTR_UNUSED const char* name) { WINPR_ASSERT(s); 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, - size_t size, const char* name) + size_t size, WINPR_ATTR_UNUSED const char* name) { size_t pos = 0; diff --git a/winpr/libwinpr/sspi/Negotiate/negotiate.c b/winpr/libwinpr/sspi/Negotiate/negotiate.c index b88050770..9c4c9397c 100644 --- a/winpr/libwinpr/sspi/Negotiate/negotiate.c +++ b/winpr/libwinpr/sspi/Negotiate/negotiate.c @@ -1244,12 +1244,14 @@ static SECURITY_STATUS SEC_ENTRY negotiate_DeleteSecurityContext(PCtxtHandle phC 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; } -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; } @@ -1484,17 +1486,17 @@ static SECURITY_STATUS SEC_ENTRY negotiate_AcquireCredentialsHandleA( return SEC_E_OK; } -static SECURITY_STATUS SEC_ENTRY negotiate_QueryCredentialsAttributesW(PCredHandle phCredential, - ULONG ulAttribute, - void* pBuffer) +static SECURITY_STATUS SEC_ENTRY negotiate_QueryCredentialsAttributesW( + WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute, + WINPR_ATTR_UNUSED void* pBuffer) { WLog_ERR(TAG, "TODO: Implement"); return SEC_E_UNSUPPORTED_FUNCTION; } -static SECURITY_STATUS SEC_ENTRY negotiate_QueryCredentialsAttributesA(PCredHandle phCredential, - ULONG ulAttribute, - void* pBuffer) +static SECURITY_STATUS SEC_ENTRY negotiate_QueryCredentialsAttributesA( + WINPR_ATTR_UNUSED PCredHandle phCredential, WINPR_ATTR_UNUSED ULONG ulAttribute, + WINPR_ATTR_UNUSED void* pBuffer) { WLog_ERR(TAG, "TODO: Implement"); return SEC_E_UNSUPPORTED_FUNCTION; diff --git a/winpr/libwinpr/sspi/Schannel/schannel.c b/winpr/libwinpr/sspi/Schannel/schannel.c index 45fba37f9..60988202f 100644 --- a/winpr/libwinpr/sspi/Schannel/schannel.c +++ b/winpr/libwinpr/sspi/Schannel/schannel.c @@ -88,9 +88,8 @@ static ALG_ID schannel_SupportedAlgs[] = { CALG_AES_128, CALG_DSS_SIGN, CALG_ECDSA }; -static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesW(PCredHandle phCredential, - ULONG ulAttribute, - void* pBuffer) +static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesW( + WINPR_ATTR_UNUSED PCredHandle phCredential, ULONG ulAttribute, void* pBuffer) { 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( - SEC_WCHAR* pszPrincipal, SEC_WCHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID, - void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential, - PTimeStamp ptsExpiry) + WINPR_ATTR_UNUSED SEC_WCHAR* pszPrincipal, WINPR_ATTR_UNUSED SEC_WCHAR* pszPackage, + ULONG fCredentialUse, WINPR_ATTR_UNUSED void* pvLogonID, void* pAuthData, + WINPR_ATTR_UNUSED SEC_GET_KEY_FN pGetKeyFn, WINPR_ATTR_UNUSED void* pvGetKeyArgument, + PCredHandle phCredential, WINPR_ATTR_UNUSED PTimeStamp ptsExpiry) { SCHANNEL_CREDENTIALS* credentials = NULL; @@ -198,9 +198,11 @@ static SECURITY_STATUS SEC_ENTRY schannel_FreeCredentialsHandle(PCredHandle phCr } static SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextW( - PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR* pszTargetName, ULONG fContextReq, - ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, - PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry) + PCredHandle phCredential, PCtxtHandle phContext, WINPR_ATTR_UNUSED SEC_WCHAR* pszTargetName, + WINPR_ATTR_UNUSED ULONG fContextReq, WINPR_ATTR_UNUSED ULONG Reserved1, + 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; SCHANNEL_CONTEXT* context = NULL; @@ -254,9 +256,10 @@ static SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextA( } static SECURITY_STATUS SEC_ENTRY schannel_AcceptSecurityContext( - PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, - ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, - PTimeStamp ptsTimeStamp) + WINPR_ATTR_UNUSED PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, + WINPR_ATTR_UNUSED ULONG fContextReq, WINPR_ATTR_UNUSED ULONG TargetDataRep, + PCtxtHandle phNewContext, PSecBufferDesc pOutput, WINPR_ATTR_UNUSED PULONG pfContextAttr, + WINPR_ATTR_UNUSED PTimeStamp ptsTimeStamp) { SECURITY_STATUS status = 0; SCHANNEL_CONTEXT* context = NULL; @@ -329,22 +332,26 @@ static SECURITY_STATUS SEC_ENTRY schannel_QueryContextAttributes(PCtxtHandle phC return SEC_E_UNSUPPORTED_FUNCTION; } -static SECURITY_STATUS SEC_ENTRY schannel_MakeSignature(PCtxtHandle phContext, ULONG fQOP, - PSecBufferDesc pMessage, ULONG MessageSeqNo) +static SECURITY_STATUS SEC_ENTRY schannel_MakeSignature(WINPR_ATTR_UNUSED PCtxtHandle phContext, + WINPR_ATTR_UNUSED ULONG fQOP, + WINPR_ATTR_UNUSED PSecBufferDesc pMessage, + WINPR_ATTR_UNUSED ULONG MessageSeqNo) { return SEC_E_OK; } -static SECURITY_STATUS SEC_ENTRY schannel_VerifySignature(PCtxtHandle phContext, - PSecBufferDesc pMessage, - ULONG MessageSeqNo, ULONG* pfQOP) +static SECURITY_STATUS SEC_ENTRY schannel_VerifySignature(WINPR_ATTR_UNUSED PCtxtHandle phContext, + WINPR_ATTR_UNUSED PSecBufferDesc pMessage, + WINPR_ATTR_UNUSED ULONG MessageSeqNo, + WINPR_ATTR_UNUSED ULONG* pfQOP) { 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, - ULONG MessageSeqNo) + WINPR_ATTR_UNUSED ULONG MessageSeqNo) { SECURITY_STATUS status = 0; 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, PSecBufferDesc pMessage, - ULONG MessageSeqNo, ULONG* pfQOP) + WINPR_ATTR_UNUSED ULONG MessageSeqNo, + WINPR_ATTR_UNUSED ULONG* pfQOP) { SECURITY_STATUS status = 0; SCHANNEL_CONTEXT* context = NULL; diff --git a/winpr/libwinpr/sspi/sspi.c b/winpr/libwinpr/sspi/sspi.c index a26cbc0c3..d795cb491 100644 --- a/winpr/libwinpr/sspi/sspi.c +++ b/winpr/libwinpr/sspi/sspi.c @@ -157,7 +157,9 @@ BOOL InitializeSspiModule_Native(void) } #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; #if defined(WITH_NATIVE_SSPI) diff --git a/winpr/libwinpr/sspi/sspi_winpr.c b/winpr/libwinpr/sspi/sspi_winpr.c index 3ff1f207c..4f6b8472e 100644 --- a/winpr/libwinpr/sspi/sspi_winpr.c +++ b/winpr/libwinpr/sspi/sspi_winpr.c @@ -975,7 +975,8 @@ static BOOL WINPR_init(void) 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); sspi_ContextBufferAllocTableNew(); diff --git a/winpr/libwinpr/sspicli/sspicli.c b/winpr/libwinpr/sspicli/sspicli.c index b1a3f0c61..75f66a5a5 100644 --- a/winpr/libwinpr/sspicli/sspicli.c +++ b/winpr/libwinpr/sspicli/sspicli.c @@ -126,8 +126,9 @@ static HANDLE_OPS ops = { LogonUserIsHandled, NULL, NULL }; -BOOL LogonUserA(LPCSTR lpszUsername, LPCSTR lpszDomain, LPCSTR lpszPassword, DWORD dwLogonType, - DWORD dwLogonProvider, PHANDLE phToken) +BOOL LogonUserA(LPCSTR lpszUsername, LPCSTR lpszDomain, WINPR_ATTR_UNUSED LPCSTR lpszPassword, + WINPR_ATTR_UNUSED DWORD dwLogonType, WINPR_ATTR_UNUSED DWORD dwLogonProvider, + PHANDLE phToken) { if (!lpszUsername) return FALSE; @@ -182,23 +183,33 @@ fail: return FALSE; } -BOOL LogonUserW(LPCWSTR lpszUsername, LPCWSTR lpszDomain, LPCWSTR lpszPassword, DWORD dwLogonType, - DWORD dwLogonProvider, PHANDLE phToken) +BOOL LogonUserW(WINPR_ATTR_UNUSED LPCWSTR lpszUsername, WINPR_ATTR_UNUSED LPCWSTR lpszDomain, + 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; } -BOOL LogonUserExA(LPCSTR lpszUsername, LPCSTR lpszDomain, LPCSTR lpszPassword, DWORD dwLogonType, - DWORD dwLogonProvider, PHANDLE phToken, PSID* ppLogonSid, PVOID* ppProfileBuffer, - LPDWORD pdwProfileLength, PQUOTA_LIMITS pQuotaLimits) +BOOL LogonUserExA(WINPR_ATTR_UNUSED LPCSTR lpszUsername, WINPR_ATTR_UNUSED LPCSTR lpszDomain, + WINPR_ATTR_UNUSED LPCSTR lpszPassword, WINPR_ATTR_UNUSED DWORD dwLogonType, + 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; } -BOOL LogonUserExW(LPCWSTR lpszUsername, LPCWSTR lpszDomain, LPCWSTR lpszPassword, DWORD dwLogonType, - DWORD dwLogonProvider, PHANDLE phToken, PSID* ppLogonSid, PVOID* ppProfileBuffer, - LPDWORD pdwProfileLength, PQUOTA_LIMITS pQuotaLimits) +BOOL LogonUserExW(WINPR_ATTR_UNUSED LPCWSTR lpszUsername, WINPR_ATTR_UNUSED LPCWSTR lpszDomain, + WINPR_ATTR_UNUSED LPCWSTR lpszPassword, WINPR_ATTR_UNUSED DWORD dwLogonType, + 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; } diff --git a/winpr/libwinpr/synch/address.c b/winpr/libwinpr/synch/address.c index c6b10abc4..0aad01237 100644 --- a/winpr/libwinpr/synch/address.c +++ b/winpr/libwinpr/synch/address.c @@ -29,16 +29,16 @@ #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, - DWORD dwMilliseconds) +BOOL WaitOnAddress(WINPR_ATTR_UNUSED VOID volatile* Address, WINPR_ATTR_UNUSED PVOID CompareAddress, + WINPR_ATTR_UNUSED size_t AddressSize, WINPR_ATTR_UNUSED DWORD dwMilliseconds) { return TRUE; } diff --git a/winpr/libwinpr/synch/critical.c b/winpr/libwinpr/synch/critical.c index 2c82cb9ed..024c35dfa 100644 --- a/winpr/libwinpr/synch/critical.c +++ b/winpr/libwinpr/synch/critical.c @@ -102,7 +102,8 @@ BOOL InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION lpCriticalSection, 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); #if !defined(WINPR_CRITICAL_SECTION_DISABLE_SPINCOUNT) @@ -121,6 +122,7 @@ DWORD SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection, DWORD dw lpCriticalSection->SpinCount = dwSpinCount; return dwPreviousSpinCount; #else + // WLog_ERR("TODO", "TODO: implement"); return 0; #endif } diff --git a/winpr/libwinpr/synch/event.c b/winpr/libwinpr/synch/event.c index 2541083e5..5a64644e1 100644 --- a/winpr/libwinpr/synch/event.c +++ b/winpr/libwinpr/synch/event.c @@ -423,8 +423,9 @@ BOOL ResetEvent(HANDLE hEvent) #endif -HANDLE CreateFileDescriptorEventW(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, - BOOL bInitialState, int FileDescriptor, ULONG mode) +HANDLE CreateFileDescriptorEventW(WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpEventAttributes, + BOOL bManualReset, WINPR_ATTR_UNUSED BOOL bInitialState, + int FileDescriptor, ULONG mode) { #ifndef _WIN32 WINPR_EVENT* event = NULL; diff --git a/winpr/libwinpr/synch/init.c b/winpr/libwinpr/synch/init.c index 0e383ebe2..97c0b07d3 100644 --- a/winpr/libwinpr/synch/init.c +++ b/winpr/libwinpr/synch/init.c @@ -29,20 +29,23 @@ #if (!defined(_WIN32)) || (defined(_WIN32) && (_WIN32_WINNT < 0x0600)) -BOOL winpr_InitOnceBeginInitialize(LPINIT_ONCE lpInitOnce, DWORD dwFlags, PBOOL fPending, - LPVOID* lpContext) +BOOL winpr_InitOnceBeginInitialize(WINPR_ATTR_UNUSED LPINIT_ONCE lpInitOnce, + WINPR_ATTR_UNUSED DWORD dwFlags, + WINPR_ATTR_UNUSED PBOOL fPending, + WINPR_ATTR_UNUSED LPVOID* lpContext) { WLog_ERR(TAG, "not implemented"); 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"); return FALSE; } -VOID winpr_InitOnceInitialize(PINIT_ONCE InitOnce) +VOID winpr_InitOnceInitialize(WINPR_ATTR_UNUSED PINIT_ONCE InitOnce) { WLog_ERR(TAG, "not implemented"); } diff --git a/winpr/libwinpr/synch/semaphore.c b/winpr/libwinpr/synch/semaphore.c index 855675b03..7dbc7e43b 100644 --- a/winpr/libwinpr/synch/semaphore.c +++ b/winpr/libwinpr/synch/semaphore.c @@ -126,8 +126,9 @@ static HANDLE_OPS ops = { SemaphoreIsHandled, NULL, NULL }; -HANDLE CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, - LONG lMaximumCount, LPCWSTR lpName) +HANDLE CreateSemaphoreW(WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, + LONG lInitialCount, WINPR_ATTR_UNUSED LONG lMaximumCount, + WINPR_ATTR_UNUSED LPCWSTR lpName) { HANDLE handle = NULL; WINPR_SEMAPHORE* semaphore = NULL; @@ -193,24 +194,27 @@ HANDLE CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lIniti } HANDLE CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, - LONG lMaximumCount, LPCSTR lpName) + LONG lMaximumCount, WINPR_ATTR_UNUSED LPCSTR lpName) { 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"); 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"); return NULL; } -BOOL ReleaseSemaphore(HANDLE hSemaphore, LONG lReleaseCount, LPLONG lpPreviousCount) +BOOL ReleaseSemaphore(HANDLE hSemaphore, LONG lReleaseCount, + WINPR_ATTR_UNUSED LPLONG lpPreviousCount) { ULONG Type = 0; WINPR_HANDLE* Object = NULL; diff --git a/winpr/libwinpr/synch/timer.c b/winpr/libwinpr/synch/timer.c index 61a682af5..745669614 100644 --- a/winpr/libwinpr/synch/timer.c +++ b/winpr/libwinpr/synch/timer.c @@ -619,20 +619,25 @@ BOOL SetWaitableTimer(HANDLE hTimer, const LARGE_INTEGER* lpDueTime, LONG lPerio BOOL SetWaitableTimerEx(HANDLE hTimer, const LARGE_INTEGER* lpDueTime, LONG lPeriod, 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, 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 */ WLog_ERR(TAG, "not implemented"); 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 */ WLog_ERR(TAG, "not implemented"); diff --git a/winpr/libwinpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c index 2a3d34744..497933304 100644 --- a/winpr/libwinpr/sysinfo/sysinfo.c +++ b/winpr/libwinpr/sysinfo/sysinfo.c @@ -266,9 +266,10 @@ void GetSystemTime(LPSYSTEMTIME lpSystemTime) } } -BOOL SetSystemTime(CONST SYSTEMTIME* lpSystemTime) +BOOL SetSystemTime(WINPR_ATTR_UNUSED CONST SYSTEMTIME* lpSystemTime) { /* TODO: Implement */ + WLog_ERR("TODO", "TODO: Implement"); 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 */ + WLog_ERR("TODO", "TODO: Implement"); return FALSE; } @@ -314,10 +316,12 @@ VOID GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime) *lpSystemTimeAsFileTime = t.ft; } -BOOL GetSystemTimeAdjustment(PDWORD lpTimeAdjustment, PDWORD lpTimeIncrement, - PBOOL lpTimeAdjustmentDisabled) +BOOL GetSystemTimeAdjustment(WINPR_ATTR_UNUSED PDWORD lpTimeAdjustment, + WINPR_ATTR_UNUSED PDWORD lpTimeIncrement, + WINPR_ATTR_UNUSED PBOOL lpTimeAdjustmentDisabled) { /* TODO: Implement */ + WLog_ERR("TODO", "TODO: Implement"); return FALSE; } diff --git a/winpr/libwinpr/thread/argv.c b/winpr/libwinpr/thread/argv.c index 6f4d1318c..e285835e3 100644 --- a/winpr/libwinpr/thread/argv.c +++ b/winpr/libwinpr/thread/argv.c @@ -271,8 +271,9 @@ LPSTR* CommandLineToArgvA(LPCSTR lpCmdLine, int* pNumArgs) #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; } diff --git a/winpr/libwinpr/thread/process.c b/winpr/libwinpr/thread/process.c index dc2ed7f5a..1cdf19d68 100644 --- a/winpr/libwinpr/thread/process.c +++ b/winpr/libwinpr/thread/process.c @@ -24,6 +24,7 @@ #include "../handle/nonehandle.h" #include +#include /** * CreateProcessA @@ -150,11 +151,13 @@ static char* FindApplicationPath(char* application) static HANDLE CreateProcessHandle(pid_t pid); static BOOL ProcessHandleCloseHandle(HANDLE handle); -static BOOL CreateProcessExA(HANDLE hToken, DWORD dwLogonFlags, LPCSTR lpApplicationName, - LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, - LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, - DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, - LPSTARTUPINFOA lpStartupInfo, +static BOOL CreateProcessExA(HANDLE hToken, WINPR_ATTR_UNUSED DWORD dwLogonFlags, + LPCSTR lpApplicationName, WINPR_ATTR_UNUSED LPSTR lpCommandLine, + WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpProcessAttributes, + WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpThreadAttributes, + WINPR_ATTR_UNUSED BOOL bInheritHandles, + WINPR_ATTR_UNUSED DWORD dwCreationFlags, LPVOID lpEnvironment, + LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation) { pid_t pid = 0; @@ -377,12 +380,17 @@ BOOL CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, lpCurrentDirectory, lpStartupInfo, lpProcessInformation); } -BOOL CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, - LPSECURITY_ATTRIBUTES lpProcessAttributes, - LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, - DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, - LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation) +BOOL CreateProcessW(WINPR_ATTR_UNUSED LPCWSTR lpApplicationName, + WINPR_ATTR_UNUSED LPWSTR lpCommandLine, + WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpProcessAttributes, + 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; } @@ -397,48 +405,67 @@ BOOL CreateProcessAsUserA(HANDLE hToken, LPCSTR lpApplicationName, LPSTR lpComma lpCurrentDirectory, lpStartupInfo, lpProcessInformation); } -BOOL CreateProcessAsUserW(HANDLE hToken, LPCWSTR lpApplicationName, LPWSTR lpCommandLine, - LPSECURITY_ATTRIBUTES lpProcessAttributes, - LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, - DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, - LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation) +BOOL CreateProcessAsUserW(WINPR_ATTR_UNUSED HANDLE hToken, + WINPR_ATTR_UNUSED LPCWSTR lpApplicationName, + WINPR_ATTR_UNUSED LPWSTR lpCommandLine, + WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpProcessAttributes, + 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; } -BOOL CreateProcessWithLogonA(LPCSTR lpUsername, LPCSTR lpDomain, LPCSTR lpPassword, - DWORD dwLogonFlags, LPCSTR lpApplicationName, LPSTR lpCommandLine, - DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, +BOOL CreateProcessWithLogonA( + WINPR_ATTR_UNUSED LPCSTR lpUsername, WINPR_ATTR_UNUSED LPCSTR lpDomain, + 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, 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, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation); } -BOOL CreateProcessWithTokenW(HANDLE hToken, DWORD dwLogonFlags, LPCWSTR lpApplicationName, - LPWSTR lpCommandLine, DWORD dwCreationFlags, LPVOID lpEnvironment, - LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, - LPPROCESS_INFORMATION lpProcessInformation) +BOOL CreateProcessWithTokenW(WINPR_ATTR_UNUSED HANDLE hToken, 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; } @@ -465,15 +492,17 @@ BOOL GetExitCodeProcess(HANDLE hProcess, LPDWORD lpExitCode) HANDLE _GetCurrentProcess(VOID) { + WLog_ERR("TODO", "TODO: implement"); return NULL; } DWORD GetCurrentProcessId(VOID) { + WLog_ERR("TODO", "TODO: implement"); return ((DWORD)getpid()); } -BOOL TerminateProcess(HANDLE hProcess, UINT uExitCode) +BOOL TerminateProcess(HANDLE hProcess, WINPR_ATTR_UNUSED UINT uExitCode) { WINPR_PROCESS* process = NULL; process = (WINPR_PROCESS*)hProcess; diff --git a/winpr/libwinpr/thread/thread.c b/winpr/libwinpr/thread/thread.c index 28d516feb..d9b04fc91 100644 --- a/winpr/libwinpr/thread/thread.c +++ b/winpr/libwinpr/thread/thread.c @@ -440,7 +440,8 @@ static INIT_ONCE threads_InitOnce = INIT_ONCE_STATIC_INIT; static pthread_t mainThreadId; 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)) { @@ -680,7 +681,7 @@ BOOL SetThreadPriority(HANDLE hThread, int nPriority) HANDLE CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, size_t dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, - DWORD dwCreationFlags, LPDWORD lpThreadId) + DWORD dwCreationFlags, WINPR_ATTR_UNUSED LPDWORD lpThreadId) { HANDLE handle = NULL; WINPR_THREAD* thread = (WINPR_THREAD*)calloc(1, sizeof(WINPR_THREAD)); @@ -813,9 +814,13 @@ BOOL ThreadCloseHandle(HANDLE handle) return TRUE; } -HANDLE CreateRemoteThread(HANDLE hProcess, LPSECURITY_ATTRIBUTES lpThreadAttributes, - size_t dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, - LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId) +HANDLE CreateRemoteThread(WINPR_ATTR_UNUSED HANDLE hProcess, + WINPR_ATTR_UNUSED LPSECURITY_ATTRIBUTES lpThreadAttributes, + 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"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); @@ -1000,7 +1005,7 @@ DWORD ResumeThread(HANDLE hThread) return 0; } -DWORD SuspendThread(HANDLE hThread) +DWORD SuspendThread(WINPR_ATTR_UNUSED HANDLE hThread) { WLog_ERR(TAG, "not implemented"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); diff --git a/winpr/libwinpr/timezone/TimeZoneNameMapUtils.c b/winpr/libwinpr/timezone/TimeZoneNameMapUtils.c index beddc5955..be5eed9be 100644 --- a/winpr/libwinpr/timezone/TimeZoneNameMapUtils.c +++ b/winpr/libwinpr/timezone/TimeZoneNameMapUtils.c @@ -398,7 +398,7 @@ static const char* map_fallback(const char* iana, TimeZoneNameType type) return res; } #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) return NULL; diff --git a/winpr/libwinpr/utils/cmdline.c b/winpr/libwinpr/utils/cmdline.c index 99d439189..46d954f80 100644 --- a/winpr/libwinpr/utils/cmdline.c +++ b/winpr/libwinpr/utils/cmdline.c @@ -389,10 +389,13 @@ int CommandLineParseArgumentsA(int argc, LPSTR* argv, COMMAND_LINE_ARGUMENT_A* o return status; } -int CommandLineParseArgumentsW(int argc, LPWSTR* argv, COMMAND_LINE_ARGUMENT_W* options, - DWORD flags, void* context, COMMAND_LINE_PRE_FILTER_FN_W preFilter, - COMMAND_LINE_POST_FILTER_FN_W postFilter) +int CommandLineParseArgumentsW(WINPR_ATTR_UNUSED int argc, WINPR_ATTR_UNUSED LPWSTR* argv, + WINPR_ATTR_UNUSED COMMAND_LINE_ARGUMENT_W* options, + 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; } diff --git a/winpr/libwinpr/utils/collections/ArrayList.c b/winpr/libwinpr/utils/collections/ArrayList.c index 63dc3aa4f..55ccd64a9 100644 --- a/winpr/libwinpr/utils/collections/ArrayList.c +++ b/winpr/libwinpr/utils/collections/ArrayList.c @@ -86,7 +86,7 @@ size_t ArrayList_Items(wArrayList* arrayList, ULONG_PTR** ppItems) * 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); return FALSE; @@ -96,7 +96,7 @@ BOOL ArrayList_IsFixedSized(wArrayList* arrayList) * 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); return FALSE; diff --git a/winpr/libwinpr/utils/debug.c b/winpr/libwinpr/utils/debug.c index 54942c740..4e70bf277 100644 --- a/winpr/libwinpr/utils/debug.c +++ b/winpr/libwinpr/utils/debug.c @@ -205,7 +205,7 @@ void winpr_log_backtrace(const char* tag, DWORD level, DWORD 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; char** msg = NULL; diff --git a/winpr/libwinpr/utils/image.c b/winpr/libwinpr/utils/image.c index 87d49d9d0..9205dae85 100644 --- a/winpr/libwinpr/utils/image.c +++ b/winpr/libwinpr/utils/image.c @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -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 break; default: - return FALSE; + return NULL; } if (!writeBitmapFileHeader(s, &bf)) @@ -269,8 +270,9 @@ fail: */ WINPR_ATTR_MALLOC(free, 1) -static void* winpr_bitmap_write_buffer(const BYTE* data, size_t size, UINT32 width, UINT32 height, - UINT32 stride, UINT32 bpp, UINT32* pSize) +static void* winpr_bitmap_write_buffer(const BYTE* data, WINPR_ATTR_UNUSED size_t size, + UINT32 width, UINT32 height, UINT32 stride, UINT32 bpp, + UINT32* pSize) { WINPR_ASSERT(data || (size == 0)); @@ -611,8 +613,10 @@ void winpr_image_free(wImage* image, BOOL bFreeBuffer) free(image); } -static void* winpr_convert_to_jpeg(const void* data, size_t size, UINT32 width, UINT32 height, - UINT32 stride, UINT32 bpp, UINT32* pSize) +static void* winpr_convert_to_jpeg(WINPR_ATTR_UNUSED const void* data, + 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(pSize); @@ -679,8 +683,11 @@ fail: } // NOLINTBEGIN(readability-non-const-parameter) -SSIZE_T winpr_convert_from_jpeg(const BYTE* comp_data, size_t comp_data_bytes, UINT32* width, - UINT32* height, UINT32* bpp, BYTE** ppdecomp_data) +SSIZE_T winpr_convert_from_jpeg(WINPR_ATTR_UNUSED const BYTE* comp_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) { 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; - *width = cinfo.image_width; - *height = cinfo.image_height; - *bpp = cinfo.num_components * 8; + *width = WINPR_ASSERTING_INT_CAST(uint32_t, cinfo.image_width); + *height = WINPR_ASSERTING_INT_CAST(uint32_t, cinfo.image_height); + *bpp = WINPR_ASSERTING_INT_CAST(uint32_t, cinfo.num_components * 8); if (!jpeg_start_decompress(&cinfo)) 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)) goto fail; @@ -740,8 +748,10 @@ fail: #endif } -static void* winpr_convert_to_webp(const void* data, size_t size, UINT32 width, UINT32 height, - UINT32 stride, UINT32 bpp, UINT32* pSize) +static void* winpr_convert_to_webp(WINPR_ATTR_UNUSED const void* data, + 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(pSize); @@ -781,7 +791,8 @@ static void* winpr_convert_to_webp(const void* data, size_t size, UINT32 width, #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) { 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; } - *width = w; - *height = h; + *width = WINPR_ASSERTING_INT_CAST(uint32_t, w); + *height = WINPR_ASSERTING_INT_CAST(uint32_t, h); *bpp = 32; *ppdecomp_data = dst; 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 */ -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 -static void* winpr_convert_to_png(const void* data, size_t size, UINT32 width, UINT32 height, - UINT32 stride, UINT32 bpp, UINT32* pSize) +static void* winpr_convert_to_png(WINPR_ATTR_UNUSED const void* data, 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(pSize); @@ -1072,8 +1085,11 @@ static void* winpr_convert_to_png(const void* data, size_t size, UINT32 width, U #endif } -SSIZE_T winpr_convert_from_png(const BYTE* comp_data, size_t comp_data_bytes, UINT32* width, - UINT32* height, UINT32* bpp, BYTE** ppdecomp_data) +SSIZE_T winpr_convert_from_png(WINPR_ATTR_UNUSED const BYTE* comp_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) 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(pstride); diff --git a/winpr/libwinpr/utils/ini.c b/winpr/libwinpr/utils/ini.c index 8fec31f1e..334e7b253 100644 --- a/winpr/libwinpr/utils/ini.c +++ b/winpr/libwinpr/utils/ini.c @@ -139,7 +139,7 @@ static FILE* IniFile_Open_File(wIniFile* ini, const char* filename) WINPR_ASSERT(ini); if (!filename) - return FALSE; + return NULL; if (ini->readOnly) return winpr_fopen(filename, "rb"); diff --git a/winpr/libwinpr/utils/sam.c b/winpr/libwinpr/utils/sam.c index eef08fe7a..8bdc214d9 100644 --- a/winpr/libwinpr/utils/sam.c +++ b/winpr/libwinpr/utils/sam.c @@ -253,7 +253,7 @@ static BOOL SamReadEntry(WINPR_SAM* sam, WINPR_SAM_ENTRY* entry) 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) { diff --git a/winpr/libwinpr/utils/ssl.c b/winpr/libwinpr/utils/ssl.c index c4ab6e3e0..248d1655f 100644 --- a/winpr/libwinpr/utils/ssl.c +++ b/winpr/libwinpr/utils/ssl.c @@ -286,7 +286,8 @@ static void winpr_openssl_cleanup(void) 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; @@ -355,7 +356,7 @@ BOOL winpr_InitializeSSL(DWORD flags) } #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) return 1; diff --git a/winpr/libwinpr/utils/wlog/BinaryAppender.c b/winpr/libwinpr/utils/wlog/BinaryAppender.c index 88ba33c86..ce0813b35 100644 --- a/winpr/libwinpr/utils/wlog/BinaryAppender.c +++ b/winpr/libwinpr/utils/wlog/BinaryAppender.c @@ -84,7 +84,7 @@ static BOOL WLog_BinaryAppender_Open(wLog* log, wLogAppender* appender) 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; @@ -167,14 +167,16 @@ static BOOL WLog_BinaryAppender_WriteMessage(wLog* log, wLogAppender* appender, return ret; } -static BOOL WLog_BinaryAppender_WriteDataMessage(wLog* log, wLogAppender* appender, - wLogMessage* message) +static BOOL WLog_BinaryAppender_WriteDataMessage(WINPR_ATTR_UNUSED wLog* log, + WINPR_ATTR_UNUSED wLogAppender* appender, + WINPR_ATTR_UNUSED wLogMessage* message) { return TRUE; } -static BOOL WLog_BinaryAppender_WriteImageMessage(wLog* log, wLogAppender* appender, - wLogMessage* message) +static BOOL WLog_BinaryAppender_WriteImageMessage(WINPR_ATTR_UNUSED wLog* log, + WINPR_ATTR_UNUSED wLogAppender* appender, + WINPR_ATTR_UNUSED wLogMessage* message) { 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; diff --git a/winpr/libwinpr/utils/wlog/CallbackAppender.c b/winpr/libwinpr/utils/wlog/CallbackAppender.c index c9f40344b..c06b841f5 100644 --- a/winpr/libwinpr/utils/wlog/CallbackAppender.c +++ b/winpr/libwinpr/utils/wlog/CallbackAppender.c @@ -28,12 +28,14 @@ typedef struct wLogCallbacks* callbacks; } 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; } -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; } @@ -145,7 +147,7 @@ static void WLog_CallbackAppender_Free(wLogAppender* appender) free(appender); } -wLogAppender* WLog_CallbackAppender_New(wLog* log) +wLogAppender* WLog_CallbackAppender_New(WINPR_ATTR_UNUSED wLog* log) { wLogCallbackAppender* CallbackAppender = NULL; diff --git a/winpr/libwinpr/utils/wlog/ConsoleAppender.c b/winpr/libwinpr/utils/wlog/ConsoleAppender.c index 2c542034c..3ada03c4e 100644 --- a/winpr/libwinpr/utils/wlog/ConsoleAppender.c +++ b/winpr/libwinpr/utils/wlog/ConsoleAppender.c @@ -38,12 +38,14 @@ typedef struct int outputStream; } 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; } -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; } @@ -138,7 +140,8 @@ static BOOL WLog_ConsoleAppender_WriteMessage(wLog* log, wLogAppender* appender, 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) { #if defined(ANDROID) @@ -160,7 +163,8 @@ static BOOL WLog_ConsoleAppender_WriteDataMessage(wLog* log, wLogAppender* appen 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) { #if defined(ANDROID) @@ -183,8 +187,8 @@ static BOOL WLog_ConsoleAppender_WriteImageMessage(wLog* log, wLogAppender* appe static int g_PacketId = 0; -static BOOL WLog_ConsoleAppender_WritePacketMessage(wLog* log, wLogAppender* appender, - wLogMessage* message) +static BOOL WLog_ConsoleAppender_WritePacketMessage(WINPR_ATTR_UNUSED wLog* log, + wLogAppender* appender, wLogMessage* message) { #if defined(ANDROID) 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; diff --git a/winpr/libwinpr/utils/wlog/FileAppender.c b/winpr/libwinpr/utils/wlog/FileAppender.c index 9a896f9dc..d8df8a69e 100644 --- a/winpr/libwinpr/utils/wlog/FileAppender.c +++ b/winpr/libwinpr/utils/wlog/FileAppender.c @@ -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; LPCSTR name = NULL; diff --git a/winpr/libwinpr/utils/wlog/Layout.c b/winpr/libwinpr/utils/wlog/Layout.c index 31f4f0a8c..e7cf52d6d 100644 --- a/winpr/libwinpr/utils/wlog/Layout.c +++ b/winpr/libwinpr/utils/wlog/Layout.c @@ -76,7 +76,7 @@ struct format_option_recurse * Log Layout */ 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_ASSERT(message); @@ -306,7 +306,8 @@ wLogLayout* WLog_GetLogLayout(wLog* log) 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); layout->FormatString = NULL; @@ -322,7 +323,7 @@ BOOL WLog_Layout_SetPrefixFormat(wLog* log, wLogLayout* layout, const char* form return TRUE; } -wLogLayout* WLog_Layout_New(wLog* log) +wLogLayout* WLog_Layout_New(WINPR_ATTR_UNUSED wLog* log) { LPCSTR prefix = "WLOG_PREFIX"; DWORD nSize = 0; @@ -374,7 +375,7 @@ wLogLayout* WLog_Layout_New(wLog* log) return layout; } -void WLog_Layout_Free(wLog* log, wLogLayout* layout) +void WLog_Layout_Free(WINPR_ATTR_UNUSED wLog* log, wLogLayout* layout) { if (layout) { diff --git a/winpr/libwinpr/utils/wlog/SyslogAppender.c b/winpr/libwinpr/utils/wlog/SyslogAppender.c index 73baade74..5849f6f80 100644 --- a/winpr/libwinpr/utils/wlog/SyslogAppender.c +++ b/winpr/libwinpr/utils/wlog/SyslogAppender.c @@ -116,7 +116,7 @@ static void WLog_SyslogAppender_Free(wLogAppender* appender) free(appender); } -wLogAppender* WLog_SyslogAppender_New(wLog* log) +wLogAppender* WLog_SyslogAppender_New(WINPR_ATTR_UNUSED wLog* log) { wLogSyslogAppender* appender = NULL; diff --git a/winpr/libwinpr/utils/wlog/UdpAppender.c b/winpr/libwinpr/utils/wlog/UdpAppender.c index 17044f893..5425f948d 100644 --- a/winpr/libwinpr/utils/wlog/UdpAppender.c +++ b/winpr/libwinpr/utils/wlog/UdpAppender.c @@ -35,7 +35,7 @@ typedef struct SOCKET sock; } 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; char addressString[256] = { 0 }; diff --git a/winpr/libwinpr/winsock/winsock.c b/winpr/libwinpr/winsock/winsock.c index fc29cee3d..ec7cf4d7f 100644 --- a/winpr/libwinpr/winsock/winsock.c +++ b/winpr/libwinpr/winsock/winsock.c @@ -730,7 +730,7 @@ BOOL WSASetEvent(HANDLE hEvent) return SetEvent(hEvent); } -BOOL WSAResetEvent(HANDLE hEvent) +BOOL WSAResetEvent(WINPR_ATTR_UNUSED HANDLE hEvent) { /* POSIX systems auto reset the socket, * 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); } -SOCKET WSASocketA(int af, int type, int protocol, LPWSAPROTOCOL_INFOA lpProtocolInfo, GROUP g, - DWORD dwFlags) +SOCKET WSASocketA(int af, int type, int protocol, + WINPR_ATTR_UNUSED LPWSAPROTOCOL_INFOA lpProtocolInfo, WINPR_ATTR_UNUSED GROUP g, + WINPR_ATTR_UNUSED DWORD dwFlags) { SOCKET s = 0; 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); } -int WSAIoctl(SOCKET s, DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbInBuffer, - LPVOID lpvOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbBytesReturned, - LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) +int WSAIoctl(SOCKET s, DWORD dwIoControlCode, WINPR_ATTR_UNUSED LPVOID lpvInBuffer, + WINPR_ATTR_UNUSED DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer, + LPDWORD lpcbBytesReturned, WINPR_ATTR_UNUSED LPWSAOVERLAPPED lpOverlapped, + WINPR_ATTR_UNUSED LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) { int fd = 0; int index = 0;