From patchwork Thu Jun 13 02:09:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai X-Patchwork-Id: 45019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5CACC27C53 for ; Thu, 13 Jun 2024 02:09:26 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.web10.5500.1718244549997826876 for ; Wed, 12 Jun 2024 19:09:10 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=6894268cef=kai.kang@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45D1MG8u015033 for ; Thu, 13 Jun 2024 02:09:09 GMT Received: from ala-exchng02.corp.ad.wrs.com (ala-exchng02.wrs.com [147.11.82.254]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3ymcgwvf9m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 13 Jun 2024 02:09:09 +0000 (GMT) Received: from ala-exchng01.corp.ad.wrs.com (147.11.82.252) by ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 12 Jun 2024 19:09:07 -0700 Received: from pek-lpg-core4.wrs.com (128.224.153.44) by ala-exchng01.corp.ad.wrs.com (147.11.82.252) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 12 Jun 2024 19:09:07 -0700 From: To: Subject: [meta-xfce][PATCH v2] xfwm4: fix gcc -Wincompatible-pointer-types Date: Thu, 13 Jun 2024 10:09:05 +0800 Message-ID: <20240613020905.220260-1-kai.kang@windriver.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-GUID: KhDsjS55LnJI7eou_jfzlyAR1d1-2Kp6 X-Proofpoint-ORIG-GUID: KhDsjS55LnJI7eou_jfzlyAR1d1-2Kp6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-12_12,2024-06-12_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 phishscore=0 bulkscore=0 spamscore=0 mlxlogscore=882 lowpriorityscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.21.0-2405170001 definitions=main-2406130012 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 13 Jun 2024 02:09:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/110885 From: Kai Kang Fix xfwm4 incompatible pointer type error with gcc option -Wincompatible-pointer-types: | ../../xfwm4-4.18.0/src/startup_notification.c:139:57: error: passing argument 2 of 'sn_startup_sequence_get_last_active_time' from incompatible pointer type [-Wincompatible-pointer-types] | 139 | sn_startup_sequence_get_last_active_time (sequence, &l_sec, &l_usec); | | ^~~~~~ | | | | | long int * Signed-off-by: Kai Kang --- v2: * fix typo and update Upstream-Status ...-fix-incompatible-pointer-type-error.patch | 38 +++++++++++++++++++ meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb | 2 + 2 files changed, 40 insertions(+) create mode 100644 meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch diff --git a/meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch b/meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch new file mode 100644 index 000000000..3e2ffe234 --- /dev/null +++ b/meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch @@ -0,0 +1,38 @@ +Fix xfwm4 incompatible pointer type error: + +| ../../xfwm4-4.18.0/src/startup_notification.c:139:57: error: passing argument 2 of 'sn_startup_sequence_get_last_active_time' from incompatible pointer type [-Wincompatible-pointer-types] +| 139 | sn_startup_sequence_get_last_active_time (sequence, &l_sec, &l_usec); +| | ^~~~~~ +| | | +| | long int * +| In file included from .../usr/include/startup-notification-1.0/libsn/sn.h:32, +| from ../../xfwm4-4.18.0/src/startup_notification.c:33: +| .../usr/include/startup-notification-1.0/libsn/sn-monitor.h:84:79: note: expected 'time_t *' {aka 'long long int *'} but argument is of type 'long int *' +| 84 | time_t *tv_sec, +| | ~~~~~~~~~~~~~~~~~~~^~~~~~ + +It is caused by a patch of startup-notification in oe-core which is +backported from upstream mailllist and changes the signature of function +sn_startup_sequence_get_last_active_time(). + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Kai Kang + +--- + src/startup_notification.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/startup_notification.c b/src/startup_notification.c +index 2a08cad..05434ca 100644 +--- a/src/startup_notification.c ++++ b/src/startup_notification.c +@@ -136,7 +136,7 @@ sn_collect_timed_out_foreach (void *element, void *data) + + sequence = element; + ctod = (CollectTimedOutData *) data; +- sn_startup_sequence_get_last_active_time (sequence, &l_sec, &l_usec); ++ sn_startup_sequence_get_last_active_time (sequence, (time_t *)&l_sec, &l_usec); + tv_sec = l_sec; tv_usec = l_usec; + + elapsed = ((double) ctod->now - (tv_sec * G_USEC_PER_SEC) - tv_usec) diff --git a/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb b/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb index 839f1c870..2770829e9 100644 --- a/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb +++ b/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb @@ -8,6 +8,8 @@ inherit xfce update-alternatives features_check REQUIRED_DISTRO_FEATURES = "x11" +SRC_URI += "file://xfwm4-fix-incompatible-pointer-type-error.patch" + SRC_URI[sha256sum] = "92cd1b889bb25cb4bc06c1c6736c238d96e79c1e706b9f77fad0a89d6e5fc13f" PACKAGECONFIG ?= " \