From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zvv2z-0000lZ-AZ for qemu-devel@nongnu.org; Mon, 09 Nov 2015 17:36:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zvv2w-0004HX-3G for qemu-devel@nongnu.org; Mon, 09 Nov 2015 17:36:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zvv2v-0004HA-RB for qemu-devel@nongnu.org; Mon, 09 Nov 2015 17:36:18 -0500 References: <1447090141-29074-1-git-send-email-quintela@redhat.com> <87ziyn81s1.fsf@emacs.mitica> From: Eric Blake Message-ID: <56411FDA.2050401@redhat.com> Date: Mon, 9 Nov 2015 15:36:10 -0700 MIME-Version: 1.0 In-Reply-To: <87ziyn81s1.fsf@emacs.mitica> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="w2eS65cpQ2oJkjm8MdWgISdjPl2ugkrl1" Subject: Re: [Qemu-devel] [PULL 00/57] Migration pull List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com, Peter Maydell Cc: Amit Shah , QEMU Developers , "Dr. David Alan Gilbert" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --w2eS65cpQ2oJkjm8MdWgISdjPl2ugkrl1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/09/2015 11:29 AM, Juan Quintela wrote: >> Fails to build on W32: >=20 > I know it is not good consolation, but it build for me and David. > And I don't understand the error. The error is a bug in mingw headers. >=20 >=20 >> >> cc1: warnings being treated as errors >> /home/petmay01/linaro/qemu-for-merges/migration/migration.c: In >> function =E2=80=98source_return_path_thread=E2=80=99: >> /home/petmay01/linaro/qemu-for-merges/migration/migration.c:1289: >> warning: format =E2=80=98%zd=E2=80=99 expects type =E2=80=98signed siz= e_t=E2=80=99, but argument 5 has >> type =E2=80=98ssize_t=E2=80=99 >=20 > expect ""signed size_t"" but receives ssize_t? I think the one wrong > is your compiler no? Usually this is a sign of a system with buggy headers where size_t and ssize_t are the same size (32-bits) but different underlying types (one based on 32-bit long, the other on 32-bit int). [There are worse cases of 64-bit size_t and 32-bit ssize_t on some fringe platforms, but I don't think qemu caters to any of those]. >=20 >>>From wikipedia: >=20 > size_t is guaranteed to be at least 16 bits wide. Additionally, POSIX= > includes ssize_t, which is a signed integral type of the same width a= s > size_t. >=20 Wikipedia lies. POSIX does NOT require ssize_t to be the same width as size_t [although any modern system that invokes that corner of POSIX permission deserves to be shot for poor quality of implementation]. > Notice that I don't claim to fully understand the size_t/ssize_t > difference. The only POSIX-ly correct portable way to print ssize_t is via casts (yes, quite ugly), as in: printf("%zu", (size_t)(ssize_t_value)); I wish %zd were portably useful for printing ssize_t, but POSIX hasn't yet made that requirement. And while I argue that mingw headers are broken (because they aren't doing the obvious implementation of size_t and ssize_t based on the same underlying type), it's also hard to argue that it is violating POSIX (since POSIX doesn't yet require the same underlying type). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --w2eS65cpQ2oJkjm8MdWgISdjPl2ugkrl1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWQR/bAAoJEKeha0olJ0NqB94H/iBpRhLGWmRl8cfcCIlSny1o G/SiZoWVS6FPdQOgA+xIgA9omOznQw1xmRbe2SXfXn0kewasbgQzhJ/T0r1xpEB+ RNuBqCQEq0OR54JdqNhnxBScLGhHCeZ6qKj52b/ptn23wyI9NBTCHonTCTf/XLIG qlwLc00JkUWc//J7S3izXMe3hwaMGwy8PLlR8iynNsv69LznXd5ZZZG+6CHE/W2x Rftyj7uebNwWV+MlsA2Hy61sv72KR1q12lEUnF9BUzUWgsep5PEa3TrQcEdSA5Jv iTuwlflkV74M5r9K7dr9bK98npv/zSKZ4Ao8qNeOrJBKB6d4Xn0LrRV8MW3XeYg= =zD7f -----END PGP SIGNATURE----- --w2eS65cpQ2oJkjm8MdWgISdjPl2ugkrl1--