[warnings] fix -Wincompatible-pointer-types

This commit is contained in:
Armin Novak 2024-08-08 11:03:24 +02:00
parent 0c20fac8f1
commit 5b2b53b15c
No known key found for this signature in database
GPG Key ID: 2CF4A2D2D3D72105
3 changed files with 9 additions and 9 deletions

View File

@ -222,7 +222,7 @@ static HANDLE ainput_server_get_channel_handle(ainput_server* ainput)
WINPR_ASSERT(ainput);
if (WTSVirtualChannelQuery(ainput->ainput_channel, WTSVirtualEventHandle, &buffer,
if (WTSVirtualChannelQuery(ainput->ainput_channel, WTSVirtualEventHandle, (void**)&buffer,
&BytesReturned) == TRUE)
{
if (BytesReturned == sizeof(HANDLE))
@ -416,7 +416,7 @@ ainput_server_context* ainput_server_context_new(HANDLE vcm)
goto fail;
return &ainput->context;
fail:
ainput_server_context_free(ainput);
ainput_server_context_free(&ainput->context);
return NULL;
}
@ -539,8 +539,8 @@ UINT ainput_server_context_poll_int(ainput_server_context* context)
BYTE* buffer = NULL;
DWORD BytesReturned = 0;
if (WTSVirtualChannelQuery(ainput->ainput_channel, WTSVirtualChannelReady, &buffer,
&BytesReturned) != TRUE)
if (WTSVirtualChannelQuery(ainput->ainput_channel, WTSVirtualChannelReady,
(void**)&buffer, &BytesReturned) != TRUE)
{
WLog_ERR(TAG, "WTSVirtualChannelReady failed,");
}

View File

@ -423,7 +423,7 @@ static BOOL ffmpeg_encode_frame(AVCodecContext* context, AVFrame* in, AVPacket*
uint8_t** pp = in->extended_data;
for (int y = 0; y < in->channels; y++)
{
float* data = pp[y];
float* data = (float*)pp[y];
for (int x = 0; x < in->nb_samples; x++)
{
const float val1 = data[x];

View File

@ -215,8 +215,8 @@ int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int
else
{
targetLength =
ucnv_convert("UTF-16LE", "UTF-8", targetStart, targetCapacity * sizeof(WCHAR),
lpMultiByteStr, cbMultiByte, &error);
ucnv_convert("UTF-16LE", "UTF-8", (char*)targetStart,
targetCapacity * sizeof(WCHAR), lpMultiByteStr, cbMultiByte, &error);
if (targetLength > 0)
targetLength /= sizeof(WCHAR);
cchWideChar = U_SUCCESS(error) ? targetLength : 0;
@ -353,14 +353,14 @@ int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int
#if defined(UCNV_CONVERT)
if (cbMultiByte == 0)
{
targetLength = ucnv_convert("UTF-8", "UTF-16LE", NULL, 0, lpWideCharStr,
targetLength = ucnv_convert("UTF-8", "UTF-16LE", NULL, 0, (char*)lpWideCharStr,
cchWideChar * sizeof(WCHAR), &error);
cbMultiByte = targetLength;
}
else
{
targetLength = ucnv_convert("UTF-8", "UTF-16LE", targetStart, targetCapacity,
lpWideCharStr, cchWideChar * sizeof(WCHAR), &error);
(char*)lpWideCharStr, cchWideChar * sizeof(WCHAR), &error);
cbMultiByte = U_SUCCESS(error) ? targetLength : 0;
}