diff mbox series

[meta-oe,15/63] xrdp: Fix build with clang-15

Message ID 20220904073417.3251865-15-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,01/63] libutempter: Upgrade to 1.2.2-alt1 | expand

Commit Message

Khem Raj Sept. 4, 2022, 7:33 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...001-mark-count-with-unused-attribute.patch | 31 +++++++++++++++++++
 meta-oe/recipes-support/xrdp/xrdp_0.9.19.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta-oe/recipes-support/xrdp/xrdp/0001-mark-count-with-unused-attribute.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/xrdp/xrdp/0001-mark-count-with-unused-attribute.patch b/meta-oe/recipes-support/xrdp/xrdp/0001-mark-count-with-unused-attribute.patch
new file mode 100644
index 0000000000..77a394d556
--- /dev/null
+++ b/meta-oe/recipes-support/xrdp/xrdp/0001-mark-count-with-unused-attribute.patch
@@ -0,0 +1,31 @@ 
+From 492f74dbea1d9a15fbc3e870e78ab52e7fc5583b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 31 Aug 2022 20:19:32 -0700
+Subject: [PATCH] mark count with unused attribute
+
+This may throw a warning when devel logs are disabled
+Fixed
+../../../xrdp-0.9.19/sesman/chansrv/chansrv.c:198:9: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]                                                                                                                     int count;                                                                                                                   ^                                                                                                                1 error generated.
+
+Upstream-Status: Submitted [https://github.com/neutrinolabs/xrdp/pull/2353]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sesman/chansrv/chansrv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c
+index 4452d998..b818bff3 100644
+--- a/sesman/chansrv/chansrv.c
++++ b/sesman/chansrv/chansrv.c
+@@ -195,7 +195,7 @@ check_timeout(void)
+     struct timeout_obj *tobj;
+     struct timeout_obj *last_tobj;
+     struct timeout_obj *temp_tobj;
+-    int count;
++    int count __attribute__((unused));
+     tui32 now;
+ 
+     LOG_DEVEL(LOG_LEVEL_DEBUG, "check_timeout:");
+-- 
+2.37.3
+
diff --git a/meta-oe/recipes-support/xrdp/xrdp_0.9.19.bb b/meta-oe/recipes-support/xrdp/xrdp_0.9.19.bb
index 3e2e84f096..b839a68294 100644
--- a/meta-oe/recipes-support/xrdp/xrdp_0.9.19.bb
+++ b/meta-oe/recipes-support/xrdp/xrdp_0.9.19.bb
@@ -15,6 +15,7 @@  SRC_URI = "https://github.com/neutrinolabs/${BPN}/releases/download/v${PV}/${BPN
            file://0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch \
            file://0001-Fix-the-compile-error.patch \
            file://0001-arch-Define-NO_NEED_ALIGN-on-ppc64.patch \
+           file://0001-mark-count-with-unused-attribute.patch \
            "
 
 SRC_URI[sha256sum] = "94017d30e475c6d7a24f651e16791551862ae46f82d8de62385e63393f5f93d0"