Fixed compilation warnings
This commit is contained in:
parent
9a2a37786e
commit
2da280b8a1
@ -214,7 +214,7 @@ static UINT ainput_server_recv_mouse_event(ainput_server* ainput, wStream* s)
|
||||
|
||||
static HANDLE ainput_server_get_channel_handle(ainput_server* ainput)
|
||||
{
|
||||
BYTE* buffer = NULL;
|
||||
void* buffer = NULL;
|
||||
DWORD BytesReturned = 0;
|
||||
HANDLE ChannelEvent = NULL;
|
||||
|
||||
|
@ -617,12 +617,13 @@ static UINT cliprdr_server_receive_temporary_directory(CliprdrServerContext* con
|
||||
cliprdr = (CliprdrServerPrivate*)context->handle;
|
||||
WINPR_ASSERT(cliprdr);
|
||||
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s, 260 * sizeof(WCHAR)))
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s,
|
||||
ARRAYSIZE(cliprdr->temporaryDirectory) * sizeof(WCHAR)))
|
||||
return CHANNEL_RC_NO_MEMORY;
|
||||
|
||||
wszTempDir = (WCHAR*)Stream_Pointer(s);
|
||||
|
||||
if (wszTempDir[259] != 0)
|
||||
if (wszTempDir[ARRAYSIZE(cliprdr->temporaryDirectory) - 1] != 0)
|
||||
{
|
||||
WLog_ERR(TAG, "wszTempDir[259] was not 0");
|
||||
return ERROR_INVALID_DATA;
|
||||
@ -639,8 +640,8 @@ static UINT cliprdr_server_receive_temporary_directory(CliprdrServerContext* con
|
||||
|
||||
length = strnlen(cliprdr->temporaryDirectory, ARRAYSIZE(cliprdr->temporaryDirectory));
|
||||
|
||||
if (length >= 260)
|
||||
length = 259;
|
||||
if (length >= ARRAYSIZE(cliprdr->temporaryDirectory))
|
||||
length = ARRAYSIZE(cliprdr->temporaryDirectory) - 1;
|
||||
|
||||
CopyMemory(tempDirectory.szTempDir, cliprdr->temporaryDirectory, length);
|
||||
tempDirectory.szTempDir[length] = '\0';
|
||||
|
@ -452,7 +452,7 @@ static BOOL xf_Pointer_New(rdpContext* context, rdpPointer* pointer)
|
||||
#endif
|
||||
|
||||
fail:
|
||||
WLog_DBG(TAG, "%s: %ld", __func__, rc ? pointer : -1);
|
||||
WLog_DBG(TAG, "%s: %p", __func__, rc ? pointer : NULL);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user