mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-11 11:47:02 +02:00
freerdp: fix build with gcc14
This commit is contained in:
parent
7a5d92d893
commit
132c12235d
1 changed files with 235 additions and 0 deletions
235
srcpkgs/freerdp/patches/gcc14.patch
Normal file
235
srcpkgs/freerdp/patches/gcc14.patch
Normal file
|
@ -0,0 +1,235 @@
|
|||
From 4f411197dc9d2076f00748b1178a60b2423030bf Mon Sep 17 00:00:00 2001
|
||||
From: Alessandro Bono <alessandro.bono369@gmail.com>
|
||||
Date: Wed, 8 May 2024 16:06:17 +0200
|
||||
Subject: [PATCH] info: Fix incompatible pointer type
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This fixes the following:
|
||||
```
|
||||
libfreerdp/core/info.c: In function ‘rdp_read_info_null_string’:
|
||||
libfreerdp/core/info.c:88:39: error: initialization of ‘const WCHAR *’ {aka ‘const short unsigned int *’} from incompatible pointer type ‘BYTE *’ {aka ‘unsigned char *’} [-Wincompatible-pointer-types]
|
||||
88 | const WCHAR* domain = Stream_Pointer(s);
|
||||
```
|
||||
---
|
||||
libfreerdp/core/info.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libfreerdp/core/info.c b/libfreerdp/core/info.c
|
||||
index 9aaa6cff6b74..c9b2fc6017d3 100644
|
||||
--- a/libfreerdp/core/info.c
|
||||
+++ b/libfreerdp/core/info.c
|
||||
@@ -85,7 +85,7 @@ static BOOL rdp_read_info_null_string(const char* what, UINT32 flags, wStream* s
|
||||
|
||||
if (cbLen > 0)
|
||||
{
|
||||
- const WCHAR* domain = Stream_Pointer(s);
|
||||
+ const WCHAR* domain = (WCHAR*)Stream_Pointer(s);
|
||||
|
||||
if (isNullTerminated && (max > 0))
|
||||
max -= nullSize;
|
||||
From f3ed1f1ac367eb21f93c9fba5047447fdccdb5cc Mon Sep 17 00:00:00 2001
|
||||
From: Alessandro Bono <alessandro.bono369@gmail.com>
|
||||
Date: Wed, 8 May 2024 16:06:26 +0200
|
||||
Subject: [PATCH] redirection: Fix incompatible pointer type
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This fixes the following:
|
||||
```
|
||||
libfreerdp/core/redirection.c: In function ‘redirection_copy_data’:
|
||||
libfreerdp/core/redirection.c:91:31: error: passing argument 1 of ‘redirection_free_data’ from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
91 | redirection_free_data(dst, plen);
|
||||
| ^~~
|
||||
| |
|
||||
| char **
|
||||
libfreerdp/core/redirection.c:80:42: note: expected ‘BYTE **’ {aka ‘unsigned char **’} but argument is of type ‘char **’
|
||||
80 | static void redirection_free_data(BYTE** str, UINT32* length)
|
||||
| ~~~~~~~^~~
|
||||
```
|
||||
---
|
||||
libfreerdp/core/redirection.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c
|
||||
index 59c6dbceed3d..63bc8cc854ca 100644
|
||||
--- a/libfreerdp/core/redirection.c
|
||||
+++ b/libfreerdp/core/redirection.c
|
||||
@@ -86,7 +86,7 @@ static void redirection_free_data(BYTE** str, UINT32* length)
|
||||
*str = NULL;
|
||||
}
|
||||
|
||||
-static BOOL redirection_copy_data(char** dst, UINT32* plen, const char* str, UINT32 len)
|
||||
+static BOOL redirection_copy_data(BYTE** dst, UINT32* plen, const BYTE* str, UINT32 len)
|
||||
{
|
||||
redirection_free_data(dst, plen);
|
||||
|
||||
From 7894a7dfc5f811cb5dacc57a09236c11744b1ec8 Mon Sep 17 00:00:00 2001
|
||||
From: Alessandro Bono <alessandro.bono369@gmail.com>
|
||||
Date: Wed, 8 May 2024 16:06:30 +0200
|
||||
Subject: [PATCH] redirection: Fix incompatible pointer type
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This fixes the following:
|
||||
```
|
||||
libfreerdp/core/redirection.c: In function ‘freerdp_settings_set_pointer_len’:
|
||||
libfreerdp/core/redirection.c:112:31: error: assignment to ‘BYTE **’ {aka ‘unsigned char **’} from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
|
||||
112 | pdata = &settings->TargetNetAddress;
|
||||
| ^
|
||||
```
|
||||
---
|
||||
libfreerdp/core/redirection.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c
|
||||
index 63bc8cc854ca..4872d4b8fb17 100644
|
||||
--- a/libfreerdp/core/redirection.c
|
||||
+++ b/libfreerdp/core/redirection.c
|
||||
@@ -109,7 +109,7 @@ static BOOL freerdp_settings_set_pointer_len(rdpSettings* settings, size_t id, c
|
||||
switch (id)
|
||||
{
|
||||
case FreeRDP_TargetNetAddress:
|
||||
- pdata = &settings->TargetNetAddress;
|
||||
+ pdata = (BYTE**)&settings->TargetNetAddress;
|
||||
plen = &settings->TargetNetAddressCount;
|
||||
break;
|
||||
case FreeRDP_LoadBalanceInfo:
|
||||
From 5b2b53b15c9af46b85c4ef0007e7fb59d7608289 Mon Sep 17 00:00:00 2001
|
||||
From: Armin Novak <armin.novak@thincast.com>
|
||||
Date: Thu, 8 Aug 2024 11:03:24 +0200
|
||||
Subject: [PATCH] [warnings] fix -Wincompatible-pointer-types
|
||||
|
||||
---
|
||||
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 943d0faf1628..fc61f9b00101 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 ef6791400d38..80df188339ee 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 dc3533a8a7b5..acbec014e67c 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;
|
||||
}
|
||||
|
||||
From d2b6771c748e54e659d5f1243a92e499c3beaa36 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gilbert <floppym@gentoo.org>
|
||||
Date: Wed, 22 May 2024 17:04:43 -0400
|
||||
Subject: [PATCH] X11: fix pointer/integer type mismatch
|
||||
|
||||
Fixed on master in 2da280b8a1748052b70b3f5a1ef0d8e932c33adc.
|
||||
---
|
||||
client/X11/xf_graphics.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c
|
||||
index 5aa1fd48b5a3..fe81e0ed91cb 100644
|
||||
--- a/client/X11/xf_graphics.c
|
||||
+++ b/client/X11/xf_graphics.c
|
||||
@@ -438,7 +438,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;
|
||||
}
|
||||
|
||||
From 67818bddb31900cdf3acb26cb0b673cc90b71cc9 Mon Sep 17 00:00:00 2001
|
||||
From: akallabeth <akallabeth@posteo.net>
|
||||
Date: Thu, 23 May 2024 09:30:33 +0200
|
||||
Subject: [PATCH] [client,wayland] fix const correctness
|
||||
|
||||
---
|
||||
client/Wayland/wlfreerdp.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/client/Wayland/wlfreerdp.c b/client/Wayland/wlfreerdp.c
|
||||
index 65e29bc51109..5988aed6b03f 100644
|
||||
--- a/client/Wayland/wlfreerdp.c
|
||||
+++ b/client/Wayland/wlfreerdp.c
|
||||
@@ -587,7 +587,7 @@ static void wlf_client_free(freerdp* instance, rdpContext* context)
|
||||
DeleteCriticalSection(&wlf->critical);
|
||||
}
|
||||
|
||||
-static void* uwac_event_clone(const void* val)
|
||||
+static void* uwac_event_clone(void* val)
|
||||
{
|
||||
UwacEvent* copy;
|
||||
UwacEvent* ev = (UwacEvent*)val;
|
||||
|
Loading…
Add table
Reference in a new issue