diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-03-01 16:10:15 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-03 18:03:56 +0000 |
commit | fb1853c66ce901d03a45f6dbef549b66bb94279d (patch) | |
tree | cf6d4f18bfdc94d720eb551af38baa0891750aa0 /meta/recipes-support | |
parent | c062f9a33606c34504356a8f511eaffaf7901679 (diff) | |
download | poky-fb1853c66ce901d03a45f6dbef549b66bb94279d.tar.gz |
vte: Fix -Wenum-constexpr-conversion warning
(From OE-Core rev: 5b6f31f41a3c8c6f2f63e219f59f0800b84b1a20)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/vte/vte/0001-vtepty.cc-Do-not-typecast-to-GSpawnFlags.patch | 58 | ||||
-rw-r--r-- | meta/recipes-support/vte/vte_0.70.2.bb | 3 |
2 files changed, 60 insertions, 1 deletions
diff --git a/meta/recipes-support/vte/vte/0001-vtepty.cc-Do-not-typecast-to-GSpawnFlags.patch b/meta/recipes-support/vte/vte/0001-vtepty.cc-Do-not-typecast-to-GSpawnFlags.patch new file mode 100644 index 0000000000..16553b506f --- /dev/null +++ b/meta/recipes-support/vte/vte/0001-vtepty.cc-Do-not-typecast-to-GSpawnFlags.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 9c7654e063d65fb2645459a32fd14eebab484857 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 1 Mar 2023 15:50:26 -0800 | ||
4 | Subject: [PATCH] vtepty.cc: Do not typecast to GSpawnFlags | ||
5 | |||
6 | GSpawnFlags is enum with max value 1 << 15 which means it fits into a | ||
7 | short int, however here we are OR'ing VTE_SPAWN_* as well which have | ||
8 | higher values | ||
9 | |||
10 | Fixes error like | ||
11 | src/vtepty.cc:577:16: error: integer value 234881535 is outside the valid range of values [0, 4095] for this enumeration type [-Wenum-constexpr-conversion] | ||
12 | |||
13 | Fixes issue https://gitlab.gnome.org/GNOME/vte/-/issues/2618 | ||
14 | |||
15 | Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/vte/-/issues/2618] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | src/vtepty.cc | 24 ++++++++++++------------ | ||
19 | 1 file changed, 12 insertions(+), 12 deletions(-) | ||
20 | |||
21 | diff --git a/src/vtepty.cc b/src/vtepty.cc | ||
22 | index 3aaa0d6b..2da2675f 100644 | ||
23 | --- a/src/vtepty.cc | ||
24 | +++ b/src/vtepty.cc | ||
25 | @@ -574,18 +574,18 @@ catch (...) | ||
26 | static constexpr inline auto | ||
27 | all_spawn_flags() noexcept | ||
28 | { | ||
29 | - return GSpawnFlags(G_SPAWN_LEAVE_DESCRIPTORS_OPEN | | ||
30 | - G_SPAWN_DO_NOT_REAP_CHILD | | ||
31 | - G_SPAWN_SEARCH_PATH | | ||
32 | - G_SPAWN_STDOUT_TO_DEV_NULL | | ||
33 | - G_SPAWN_STDERR_TO_DEV_NULL | | ||
34 | - G_SPAWN_CHILD_INHERITS_STDIN | | ||
35 | - G_SPAWN_FILE_AND_ARGV_ZERO | | ||
36 | - G_SPAWN_SEARCH_PATH_FROM_ENVP | | ||
37 | - G_SPAWN_CLOEXEC_PIPES | | ||
38 | - VTE_SPAWN_NO_PARENT_ENVV | | ||
39 | - VTE_SPAWN_NO_SYSTEMD_SCOPE | | ||
40 | - VTE_SPAWN_REQUIRE_SYSTEMD_SCOPE); | ||
41 | + return (G_SPAWN_LEAVE_DESCRIPTORS_OPEN | | ||
42 | + G_SPAWN_DO_NOT_REAP_CHILD | | ||
43 | + G_SPAWN_SEARCH_PATH | | ||
44 | + G_SPAWN_STDOUT_TO_DEV_NULL | | ||
45 | + G_SPAWN_STDERR_TO_DEV_NULL | | ||
46 | + G_SPAWN_CHILD_INHERITS_STDIN | | ||
47 | + G_SPAWN_FILE_AND_ARGV_ZERO | | ||
48 | + G_SPAWN_SEARCH_PATH_FROM_ENVP | | ||
49 | + G_SPAWN_CLOEXEC_PIPES | | ||
50 | + VTE_SPAWN_NO_PARENT_ENVV | | ||
51 | + VTE_SPAWN_NO_SYSTEMD_SCOPE | | ||
52 | + VTE_SPAWN_REQUIRE_SYSTEMD_SCOPE); | ||
53 | } | ||
54 | |||
55 | static constexpr inline auto | ||
56 | -- | ||
57 | 2.39.2 | ||
58 | |||
diff --git a/meta/recipes-support/vte/vte_0.70.2.bb b/meta/recipes-support/vte/vte_0.70.2.bb index ec2fb1f522..001f413c19 100644 --- a/meta/recipes-support/vte/vte_0.70.2.bb +++ b/meta/recipes-support/vte/vte_0.70.2.bb | |||
@@ -20,7 +20,8 @@ GIDOCGEN_MESON_OPTION = "docs" | |||
20 | inherit gnomebase gi-docgen features_check upstream-version-is-even gobject-introspection | 20 | inherit gnomebase gi-docgen features_check upstream-version-is-even gobject-introspection |
21 | 21 | ||
22 | # vapigen.m4 is required when vala is not present (but the one from vala should be used normally) | 22 | # vapigen.m4 is required when vala is not present (but the one from vala should be used normally) |
23 | SRC_URI += "file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch" | 23 | SRC_URI += "file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \ |
24 | file://0001-vtepty.cc-Do-not-typecast-to-GSpawnFlags.patch" | ||
24 | SRC_URI[archive.sha256sum] = "4d15b4380de3f564d57eabd006389c407c705df5b0c70030fdcc24971a334d80" | 25 | SRC_URI[archive.sha256sum] = "4d15b4380de3f564d57eabd006389c407c705df5b0c70030fdcc24971a334d80" |
25 | 26 | ||
26 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | 27 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" |