Received: from eggs.gnu.org ([208.118.235.92]:35151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1aNg-0001Yu-RG for qemu-devel@nongnu.org; Wed, 15 Aug 2012 05:59:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1aNf-0006xe-SW for qemu-devel@nongnu.org; Wed, 15 Aug 2012 05:59:16 -0400 From: Alexander Graf Date: Wed, 15 Aug 2012 11:58:49 +0200 Message-Id: <1345024742-18394-12-git-send-email-agraf@suse.de> In-Reply-To: <1345024742-18394-1-git-send-email-agraf@suse.de> References: <1345024742-18394-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 11/24] xbzrle: fix compilation on ppc32 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc Mailing List Cc: Blue Swirl , qemu-devel qemu-devel , Aurelien Jarno When compiling the xbzrle code on my ppc32 user space, I hit the followin= g gcc compiler warning (treated as an error): cc1: warnings being treated as errors savevm.c: In function =E2=80=98xbzrle_encode_buffer=E2=80=99: savevm.c:2476: error: overflow in implicit constant conversion Fix this by making the cast explicit, rather than implicit. Signed-off-by: Alexander Graf --- savevm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 0ea10c9..9ab4d83 100644 --- a/savevm.c +++ b/savevm.c @@ -2473,7 +2473,7 @@ int xbzrle_encode_buffer(uint8_t *old_buf, uint8_t = *new_buf, int slen, /* word at a time for speed, use of 32-bit long okay */ if (!res) { /* truncation to 32-bit long okay */ - long mask =3D 0x0101010101010101ULL; + long mask =3D (long)0x0101010101010101ULL; while (i < slen) { xor =3D *(long *)(old_buf + i) ^ *(long *)(new_buf + i); if ((xor - mask) & ~xor & (mask << 7)) { --=20 1.6.0.2