From 0ac13ecbc4c20d322b1c49935678c25e621a0a99 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 13 Jan 2012 15:26:57 +0100 Subject: client-x11: Fix building with gcc-4.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this change gcc says: x11/res.cpp:31:1: error: narrowing conversion of ‘(((unsigned int)_alt_image.::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.::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.::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 --- client/x11/images/alt_image.c | 4 ++-- client/x11/images/red_icon.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'client/x11/images') 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, { -- cgit