freerdp: fix build with gcc-14

* bump SRCREV to get more gcc-14 fixes already merged upstream:

$ git log --oneline 2.11.7..origin/stable-2.0
efa899d3d (HEAD -> stable-2.0, origin/stable-2.0) Merge pull request #10172 from AlessandroBono/wip/abono/incompatible-pointer
7894a7dfc redirection: Fix incompatible pointer type
f3ed1f1ac redirection: Fix incompatible pointer type
4f411197d info: Fix incompatible pointer type
a383740a2 next-dev-2.11.8-dev

* fixes:
  http://errors.yoctoproject.org/Errors/Details/766906/
  freerdp/2.11.2/git/libfreerdp/core/redirection.c:91:31: error: passing argument 1 of 'redirection_free_data' from incompatible pointer type [-Wincompatible-pointer-types]
  freerdp/2.11.2/git/libfreerdp/core/redirection.c:112:31: error: assignment to 'BYTE **' {aka 'unsigned char **'} from incompatible pointer type 'char **' [-Wincompatible-pointer-types]
  freerdp/2.11.2/git/libfreerdp/core/redirection.c:139:38: error: passing argument 1 of 'redirection_copy_data' from incompatible pointer type [-Wincompatible-pointer-types]
  freerdp/2.11.2/git/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]

  and backport one commit from master to fix:
  git/channels/ainput/server/ainput_main.c:225:83: error: passing argument 3 of 'WTSVirtualChannelQuery' from incompatible pointer type [-Wincompatible-pointer-types]
  git/channels/ainput/server/ainput_main.c:419:36: error: passing argument 1 of 'ainput_server_context_free' from incompatible pointer type [-Wincompatible-pointer-types]
  git/channels/ainput/server/ainput_main.c:542:100: error: passing argument 3 of 'WTSVirtualChannelQuery' from incompatible pointer type [-Wincompatible-pointer-types]

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Martin Jansa 2024-05-14 17:49:58 +02:00 committed by Khem Raj
parent 1922fb35f6
commit da03f5dadc
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 74 additions and 1 deletions

View File

@ -0,0 +1,72 @@
From 130094de3244d5039e463e1142e1ec487c1104ef Mon Sep 17 00:00:00 2001
From: Armin Novak <armin.novak@thincast.com>
Date: Tue, 22 Feb 2022 12:05:08 +0100
Subject: [PATCH] Fixed compilation warnings in ainput channel
Upstream-Status: Backport [130094de3 Fixed compilation warnings in ainput channel]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
channels/ainput/server/ainput_main.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/channels/ainput/server/ainput_main.c b/channels/ainput/server/ainput_main.c
index bc1737ee1..17d2ec681 100644
--- a/channels/ainput/server/ainput_main.c
+++ b/channels/ainput/server/ainput_main.c
@@ -192,7 +192,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;
@@ -389,7 +389,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;
}
@@ -496,17 +496,23 @@ UINT ainput_server_context_poll_int(ainput_server_context* context)
break;
case AINPUT_OPENED:
{
- BYTE* buffer = NULL;
+ union
+ {
+ BYTE* pb;
+ void* pv;
+ } buffer;
DWORD BytesReturned = 0;
- if (WTSVirtualChannelQuery(ainput->ainput_channel, WTSVirtualChannelReady, &buffer,
+ buffer.pv = NULL;
+
+ if (WTSVirtualChannelQuery(ainput->ainput_channel, WTSVirtualChannelReady, &buffer.pv,
&BytesReturned) != TRUE)
{
WLog_ERR(TAG, "WTSVirtualChannelReady failed,");
}
else
{
- if (*buffer != 0)
+ if (*buffer.pb != 0)
{
error = ainput_server_send_version(ainput);
if (error)
@@ -518,7 +524,7 @@ UINT ainput_server_context_poll_int(ainput_server_context* context)
else
error = CHANNEL_RC_OK;
}
- WTSFreeMemory(buffer);
+ WTSFreeMemory(buffer.pv);
}
break;
case AINPUT_VERSION_SENT:
--
2.43.0

View File

@ -13,12 +13,13 @@ inherit pkgconfig cmake gitpkgv
PE = "1"
PKGV = "${GITPKGVTAG}"
SRCREV = "7f6cc93c21d7f0faad6daacca06f494f29ce882c"
SRCREV = "efa899d3deb8595a29fabb2a2251722f9d7e0d7f"
SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \
file://winpr-makecert-Build-with-install-RPATH.patch \
file://0001-Fixed-compilation-warnings.patch \
file://0001-Fix-const-qualifier-error.patch \
file://0002-Do-not-install-tools-a-CMake-targets.patch \
file://0001-Fixed-compilation-warnings-in-ainput-channel.patch \
"
S = "${WORKDIR}/git"