90 lines
3.6 KiB
Diff
90 lines
3.6 KiB
Diff
From: Armin Novak <armin.novak@thincast.com>
|
|
Date: Thu, 8 Aug 2024 11:03:24 +0200
|
|
Subject: [warnings] fix -Wincompatible-pointer-types
|
|
|
|
(cherry picked from commit 5b2b53b15c9af46b85c4ef0007e7fb59d7608289)
|
|
---
|
|
channels/ainput/server/ainput_main.c | 8 ++++----
|
|
libfreerdp/codec/dsp_ffmpeg.c | 2 +-
|
|
winpr/libwinpr/crt/unicode.c | 8 ++++----
|
|
3 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/channels/ainput/server/ainput_main.c b/channels/ainput/server/ainput_main.c
|
|
index 943d0fa..fc61f9b 100644
|
|
--- a/channels/ainput/server/ainput_main.c
|
|
+++ b/channels/ainput/server/ainput_main.c
|
|
@@ -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,");
|
|
}
|
|
diff --git a/libfreerdp/codec/dsp_ffmpeg.c b/libfreerdp/codec/dsp_ffmpeg.c
|
|
index ef67914..80df188 100644
|
|
--- a/libfreerdp/codec/dsp_ffmpeg.c
|
|
+++ b/libfreerdp/codec/dsp_ffmpeg.c
|
|
@@ -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];
|
|
diff --git a/winpr/libwinpr/crt/unicode.c b/winpr/libwinpr/crt/unicode.c
|
|
index dc3533a..acbec01 100644
|
|
--- a/winpr/libwinpr/crt/unicode.c
|
|
+++ b/winpr/libwinpr/crt/unicode.c
|
|
@@ -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;
|
|
}
|
|
|