summaryrefslogtreecommitdiffstats
path: root/recipes-support
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2018-03-02 15:46:11 -0600
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-03-08 16:15:12 -0500
commit7f8de36343df74ba7aacc2ccb61e3b78d9b90ac0 (patch)
tree65c783e5861e0a190821bf4ae839c11309128859 /recipes-support
parent15ec4cbd03c9c5372b59eb9c2eecc1512bd1c99e (diff)
downloadmeta-cloud-services-7f8de36343df74ba7aacc2ccb61e3b78d9b90ac0.tar.gz
spice: Fix compile errors from gcc 7 with spice 0.12.4
../../git/server/red_parse_qxl.c:367:18: error: 'BITMAP_FMT_IS_RGB' defined but not used [-Werror=unused-const-variable=] static const int BITMAP_FMT_IS_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1}; ^~~~~~~~~~~~~~~~~ ../../git/server/inputs_channel.c: In function 'inputs_channel_handle_parsed': ../../git/server/inputs_channel.c:317:38: error: this statement may fall through [-Werror=implicit-fallthrough=] case SPICE_MSGC_INPUTS_KEY_DOWN: { ^ ../../git/server/inputs_channel.c:324:5: note: here case SPICE_MSGC_INPUTS_KEY_UP: { ^~~~ ../../git/server/reds.c: In function 'vdi_port_read_one_msg_from_device': ../../git/server/reds.c:797:31: error: this statement may fall through [-Werror=implicit-fallthrough=] state->read_state = VDI_PORT_READ_STATE_GET_BUFF; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../git/server/reds.c:798:9: note: here case VDI_PORT_READ_STATE_GET_BUFF: { ^~~~ ../../git/server/reds.c:807:31: error: this statement may fall through [-Werror=implicit-fallthrough=] state->read_state = VDI_PORT_READ_STATE_READ_DATA; ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../git/server/reds.c:809:9: note: here case VDI_PORT_READ_STATE_READ_DATA: ^~~~ This patch just adds the fallthrough comments which are already checked in upstream along with the removal of the static variable which is not used. The newer versions of spice already have this fixed, so there is no need to further upstream this patch. It gets dropped in the future. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-support')
-rw-r--r--recipes-support/spice/files/v0.12.4_0001-spice-Fix-compile-problems-against-spice-0.12.4-with.patch88
-rw-r--r--recipes-support/spice/spice_git.bb1
2 files changed, 89 insertions, 0 deletions
diff --git a/recipes-support/spice/files/v0.12.4_0001-spice-Fix-compile-problems-against-spice-0.12.4-with.patch b/recipes-support/spice/files/v0.12.4_0001-spice-Fix-compile-problems-against-spice-0.12.4-with.patch
new file mode 100644
index 0000000..cd5eb85
--- /dev/null
+++ b/recipes-support/spice/files/v0.12.4_0001-spice-Fix-compile-problems-against-spice-0.12.4-with.patch
@@ -0,0 +1,88 @@
1From 26ae6be2c1ac03e6ea017f58d0b126c9eebae5f9 Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Fri, 2 Mar 2018 10:47:09 -0600
4Subject: [PATCH] spice: Fix compile problems against spice 0.12.4 with gcc 7
5
6These errors are generated by gcc 7.
7
8../../git/server/red_parse_qxl.c:367:18: error: 'BITMAP_FMT_IS_RGB' defined but not used [-Werror=unused-const-variable=]
9 static const int BITMAP_FMT_IS_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
10 ^~~~~~~~~~~~~~~~~
11../../git/server/inputs_channel.c: In function 'inputs_channel_handle_parsed':
12../../git/server/inputs_channel.c:317:38: error: this statement may fall through [-Werror=implicit-fallthrough=]
13 case SPICE_MSGC_INPUTS_KEY_DOWN: {
14 ^
15../../git/server/inputs_channel.c:324:5: note: here
16 case SPICE_MSGC_INPUTS_KEY_UP: {
17 ^~~~
18../../git/server/reds.c: In function 'vdi_port_read_one_msg_from_device':
19../../git/server/reds.c:797:31: error: this statement may fall through [-Werror=implicit-fallthrough=]
20 state->read_state = VDI_PORT_READ_STATE_GET_BUFF;
21 ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22../../git/server/reds.c:798:9: note: here
23 case VDI_PORT_READ_STATE_GET_BUFF: {
24 ^~~~
25../../git/server/reds.c:807:31: error: this statement may fall through [-Werror=implicit-fallthrough=]
26 state->read_state = VDI_PORT_READ_STATE_READ_DATA;
27 ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28../../git/server/reds.c:809:9: note: here
29 case VDI_PORT_READ_STATE_READ_DATA:
30 ^~~~
31
32This patch just adds the fallthrough comments which are already
33checked in upstream along with the removal of the static variable
34which is not used.
35---
36 server/inputs_channel.c | 1 +
37 server/red_parse_qxl.c | 4 ----
38 server/reds.c | 2 ++
39 spice-common | 2 +-
40 4 files changed, 4 insertions(+), 5 deletions(-)
41
42diff --git a/server/inputs_channel.c b/server/inputs_channel.c
43index 931dac1..d6805c4 100644
44--- a/server/inputs_channel.c
45+++ b/server/inputs_channel.c
46@@ -321,6 +321,7 @@ static int inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui
47 activate_modifiers_watch();
48 }
49 }
50+ /* fallthrough */
51 case SPICE_MSGC_INPUTS_KEY_UP: {
52 SpiceMsgcKeyDown *key_down = (SpiceMsgcKeyDown *)buf;
53 for (i = 0; i < 4; i++) {
54diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
55index 6c0b065..c361e6b 100644
56--- a/server/red_parse_qxl.c
57+++ b/server/red_parse_qxl.c
58@@ -362,10 +362,6 @@ static int bitmap_consistent(SpiceBitmap *bitmap)
59 return TRUE;
60 }
61
62-// This is based on SPICE_BITMAP_FMT_*, copied from server/red_worker.c
63-// to avoid a possible unoptimization from making it non static.
64-static const int BITMAP_FMT_IS_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
65-
66 static SpiceImage *red_get_image(RedMemSlotInfo *slots, int group_id,
67 QXLPHYSICAL addr, uint32_t flags, int is_mask)
68 {
69diff --git a/server/reds.c b/server/reds.c
70index 6f262b0..4246170 100644
71--- a/server/reds.c
72+++ b/server/reds.c
73@@ -795,6 +795,7 @@ static SpiceCharDeviceMsgToClient *vdi_port_read_one_msg_from_device(SpiceCharDe
74 }
75 state->message_recive_len = state->vdi_chunk_header.size;
76 state->read_state = VDI_PORT_READ_STATE_GET_BUFF;
77+ /* fallthrough */
78 case VDI_PORT_READ_STATE_GET_BUFF: {
79 if (!(state->current_read_buf = vdi_port_read_buf_get())) {
80 return NULL;
81@@ -806,6 +807,7 @@ static SpiceCharDeviceMsgToClient *vdi_port_read_one_msg_from_device(SpiceCharDe
82 state->message_recive_len -= state->recive_len;
83 state->read_state = VDI_PORT_READ_STATE_READ_DATA;
84 }
85+ /* fallthrough */
86 case VDI_PORT_READ_STATE_READ_DATA:
87 n = sif->read(vdagent, state->recive_pos, state->recive_len);
88 if (!n) {
diff --git a/recipes-support/spice/spice_git.bb b/recipes-support/spice/spice_git.bb
index c0fdd9c..bca447d 100644
--- a/recipes-support/spice/spice_git.bb
+++ b/recipes-support/spice/spice_git.bb
@@ -35,6 +35,7 @@ SRC_URI += " \
35 file://spice-fix-CVE-2013-4282.patch \ 35 file://spice-fix-CVE-2013-4282.patch \
36 file://configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch \ 36 file://configure.ac-add-subdir-objects-to-AM_INIT_AUTOMAKE.patch \
37 file://build-allow-separated-src-and-build-dirs.patch \ 37 file://build-allow-separated-src-and-build-dirs.patch \
38 file://v0.12.4_0001-spice-Fix-compile-problems-against-spice-0.12.4-with.patch \
38 file://0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch \ 39 file://0001-red_parse_qxl-Fix-BITMAP_FMT_IS_RGB-defined-but-not-.patch \
39 file://0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch \ 40 file://0001-Use-PRI-macros-in-printf-to-keep-compatibility-betwe.patch \
40 file://Fix-build-issues-with-gcc-7.patch \ 41 file://Fix-build-issues-with-gcc-7.patch \