From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1GNk-00062I-4s for qemu-devel@nongnu.org; Tue, 14 Aug 2012 08:38:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1GNi-0007rh-TD for qemu-devel@nongnu.org; Tue, 14 Aug 2012 08:38:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1GNi-0007ra-LA for qemu-devel@nongnu.org; Tue, 14 Aug 2012 08:37:58 -0400 Message-ID: <502A46A4.50009@redhat.com> Date: Tue, 14 Aug 2012 06:37:56 -0600 From: Eric Blake MIME-Version: 1.0 References: <1344941747-30158-1-git-send-email-agraf@suse.de> In-Reply-To: <1344941747-30158-1-git-send-email-agraf@suse.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigA6B8868AA3B6AE2743B240A1" Subject: Re: [Qemu-devel] [PATCH] xbzrle: fix compilation on ppc32 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Orit Wasserman , qemu-devel qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA6B8868AA3B6AE2743B240A1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/14/2012 04:55 AM, Alexander Graf wrote: > When compiling the xbzrle code on my ppc32 user space, I hit the follow= ing > gcc compiler warning (treated as an error): >=20 > 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 >=20 > Fix this by making the cast explicit, rather than implicit. >=20 > Signed-off-by: Alexander Graf > --- > savevm.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Reviewed-by: Eric Blake >=20 > 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; What a picky compiler - too bad it can't just read the comment above that said we are okay with truncation :) --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigA6B8868AA3B6AE2743B240A1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQKkalAAoJEKeha0olJ0NqOq8H/0JgOvlLGBeOwIi5UPhaoBGR l+u/6LUTMUQfW+pugyZx6aU1qeCCXPG25D61gVuJup9gYT4s1FSVMgX5R+bOsZM+ Gd1uJrllWXz19qY5BrUfdCtrP5SswYEIqEIjw8ku3mWnWKP182HltZncbUVYyfC1 3nsDGBl0n59rRwHu/xs6v4/Zi7gx1mEo305ijnFvJRztRsIp5hokveHClxwfgNr5 gQxNmhDKHENGwCwYhBXD4pFELvLTdcLeJMW+SoYXKPcuWJy9Vt1BVwggU+LU/g9q 258/5panwZvwQCIxug0xG+CWnIePF+SI0j6keR/DMVSUYRoRmS+FRQNgu0MYig0= =0FSe -----END PGP SIGNATURE----- --------------enigA6B8868AA3B6AE2743B240A1--