diff options
author | Kai Kang <kai.kang@windriver.com> | 2024-06-13 10:09:05 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-06-12 21:08:07 -0700 |
commit | e33270bb821c8f8f3e3f3be501d3a14e0fa035c1 (patch) | |
tree | e489608a45b651c97c8a4d612b0b3d6b548bb2ca | |
parent | 39d164f0c33d24f40e676aac152dfe50f2c00695 (diff) | |
download | meta-openembedded-e33270bb821c8f8f3e3f3be501d3a14e0fa035c1.tar.gz |
xfwm4: fix gcc -Wincompatible-pointer-types
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 <kai.kang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch | 38 | ||||
-rw-r--r-- | meta-xfce/recipes-xfce/xfwm4/xfwm4_4.18.0.bb | 2 |
2 files changed, 40 insertions, 0 deletions
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 0000000000..3e2ffe234f --- /dev/null +++ b/meta-xfce/recipes-xfce/xfwm4/xfwm4/xfwm4-fix-incompatible-pointer-type-error.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Fix xfwm4 incompatible pointer type error: | ||
2 | |||
3 | | ../../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] | ||
4 | | 139 | sn_startup_sequence_get_last_active_time (sequence, &l_sec, &l_usec); | ||
5 | | | ^~~~~~ | ||
6 | | | | | ||
7 | | | long int * | ||
8 | | In file included from .../usr/include/startup-notification-1.0/libsn/sn.h:32, | ||
9 | | from ../../xfwm4-4.18.0/src/startup_notification.c:33: | ||
10 | | .../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 *' | ||
11 | | 84 | time_t *tv_sec, | ||
12 | | | ~~~~~~~~~~~~~~~~~~~^~~~~~ | ||
13 | |||
14 | It is caused by a patch of startup-notification in oe-core which is | ||
15 | backported from upstream mailllist and changes the signature of function | ||
16 | sn_startup_sequence_get_last_active_time(). | ||
17 | |||
18 | Upstream-Status: Inappropriate [oe-specific] | ||
19 | |||
20 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
21 | |||
22 | --- | ||
23 | src/startup_notification.c | 2 +- | ||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
25 | |||
26 | diff --git a/src/startup_notification.c b/src/startup_notification.c | ||
27 | index 2a08cad..05434ca 100644 | ||
28 | --- a/src/startup_notification.c | ||
29 | +++ b/src/startup_notification.c | ||
30 | @@ -136,7 +136,7 @@ sn_collect_timed_out_foreach (void *element, void *data) | ||
31 | |||
32 | sequence = element; | ||
33 | ctod = (CollectTimedOutData *) data; | ||
34 | - sn_startup_sequence_get_last_active_time (sequence, &l_sec, &l_usec); | ||
35 | + sn_startup_sequence_get_last_active_time (sequence, (time_t *)&l_sec, &l_usec); | ||
36 | tv_sec = l_sec; tv_usec = l_usec; | ||
37 | |||
38 | 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 839f1c8704..2770829e98 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 | |||
8 | 8 | ||
9 | REQUIRED_DISTRO_FEATURES = "x11" | 9 | REQUIRED_DISTRO_FEATURES = "x11" |
10 | 10 | ||
11 | SRC_URI += "file://xfwm4-fix-incompatible-pointer-type-error.patch" | ||
12 | |||
11 | SRC_URI[sha256sum] = "92cd1b889bb25cb4bc06c1c6736c238d96e79c1e706b9f77fad0a89d6e5fc13f" | 13 | SRC_URI[sha256sum] = "92cd1b889bb25cb4bc06c1c6736c238d96e79c1e706b9f77fad0a89d6e5fc13f" |
12 | 14 | ||
13 | PACKAGECONFIG ?= " \ | 15 | PACKAGECONFIG ?= " \ |