summaryrefslogtreecommitdiffstats
path: root/client/x11
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-01-13 15:26:57 +0100
committerHans de Goede <hdegoede@redhat.com>2012-01-13 15:26:57 +0100
commit0ac13ecbc4c20d322b1c49935678c25e621a0a99 (patch)
treee5e80aafa2a9abb6d56cdeacf60cc166ccb7f241 /client/x11
parentc6800dacf01e8d06b1fde3ca5893bf83d7fa270e (diff)
downloadspice-0ac13ecbc4c20d322b1c49935678c25e621a0a99.tar.gz
spice-0ac13ecbc4c20d322b1c49935678c25e621a0a99.tar.xz
spice-0ac13ecbc4c20d322b1c49935678c25e621a0a99.zip
client-x11: Fix building with gcc-4.7
Without this change gcc says: x11/res.cpp:31:1: error: narrowing conversion of ‘(((unsigned int)_alt_image.<anonymous struct>::width) * 4u)’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Werror=narrowing] x11/res.cpp:61:1: error: narrowing conversion of ‘_red_icon.<anonymous struct>::width’ from ‘const uint32_t {aka const unsigned int}’ to ‘int’ inside { } is ill-formed in C++11 [-Werror=narrowing] x11/res.cpp:61:1: error: narrowing conversion of ‘_red_icon.<anonymous struct>::height’ from ‘const uint32_t {aka const unsigned int}’ to ‘int’ inside { } is ill-formed in C++11 [-Werror=narrowing] cc1plus: all warnings being treated as errors Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'client/x11')
-rw-r--r--client/x11/images/alt_image.c4
-rw-r--r--client/x11/images/red_icon.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/client/x11/images/alt_image.c b/client/x11/images/alt_image.c
index 79683395..e11cf1f1 100644
--- a/client/x11/images/alt_image.c
+++ b/client/x11/images/alt_image.c
@@ -1,6 +1,6 @@
static const struct {
- uint32_t width;
- uint32_t height;
+ int width;
+ int height;
uint8_t pixel_data[17496];
} _alt_image = { 81, 54, {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
diff --git a/client/x11/images/red_icon.c b/client/x11/images/red_icon.c
index ce1a7d45..143d4e2d 100644
--- a/client/x11/images/red_icon.c
+++ b/client/x11/images/red_icon.c
@@ -1,6 +1,6 @@
static const struct {
- uint32_t width;
- uint32_t height;
+ int width;
+ int height;
uint8_t pixmap[4096];
uint8_t mask[128];
} _red_icon = { 32, 32, {