From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Martin Jansa <martin.jansa@gmail.com>
Subject: [meta-oe][PATCH] freerdp: fix build with gcc-14
Date: Tue, 14 May 2024 17:48:08 +0200 [thread overview]
Message-ID: <20240514154808.1175313-1-martin.jansa@gmail.com> (raw)
* 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>
---
...mpilation-warnings-in-ainput-channel.patch | 72 +++++++++++++++++++
.../recipes-support/freerdp/freerdp_2.11.7.bb | 5 +-
2 files changed, 75 insertions(+), 2 deletions(-)
create mode 100644 meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings-in-ainput-channel.patch
diff --git a/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings-in-ainput-channel.patch b/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings-in-ainput-channel.patch
new file mode 100644
index 0000000000..62600cddab
--- /dev/null
+++ b/meta-oe/recipes-support/freerdp/freerdp/0001-Fixed-compilation-warnings-in-ainput-channel.patch
@@ -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
+
diff --git a/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb b/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb
index cbf29baa31..5aa88fbb99 100644
--- a/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb
+++ b/meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb
@@ -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"
@@ -94,4 +95,4 @@ python populate_packages:prepend () {
# http://errors.yoctoproject.org/Errors/Details/766906/
# 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]
-CFLAGS += "-Wno-error=incompatible-pointer-types"
+# CFLAGS += "-Wno-error=incompatible-pointer-types"
--
2.45.0
reply other threads:[~2024-05-14 15:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240514154808.1175313-1-martin.jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).