From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMe1n-0006B1-Nv for qemu-devel@nongnu.org; Mon, 11 Jul 2016 12:25:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMe1i-0005Tu-PL for qemu-devel@nongnu.org; Mon, 11 Jul 2016 12:25:51 -0400 References: <1467998504-15744-1-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <5783C882.4060104@redhat.com> Date: Mon, 11 Jul 2016 10:25:38 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pnEckcHcO6HBIv7TlK35UXF0RpPk6Frow" Subject: Re: [Qemu-devel] [PULL 00/32] Block layer patches List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Kevin Wolf Cc: QEMU Developers , Qemu-block This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pnEckcHcO6HBIv7TlK35UXF0RpPk6Frow From: Eric Blake To: Peter Maydell , Kevin Wolf Cc: QEMU Developers , Qemu-block Message-ID: <5783C882.4060104@redhat.com> Subject: Re: [Qemu-devel] [PULL 00/32] Block layer patches References: <1467998504-15744-1-git-send-email-kwolf@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/11/2016 10:14 AM, Peter Maydell wrote: >=20 > Format string warning on OSX, I'm afraid: >=20 > /Users/pm215/src/qemu-for-merges/qemu-io-cmds.c:393:69: warning: > format specifies type 'size_t' (aka 'unsigned long') but the argument > has type 'unsigned long long' [-Wformat] > printf("Argument '%s' exceeds maximum size %zu\n", arg, SIZ= E_MAX); > ~~~ ^~~= ~~~~~ > %llu > /usr/include/stdint.h:153:20: note: expanded from macro 'SIZE_MAX' > #define SIZE_MAX UINT64_MAX > ^~~~~~~~~~ > /usr/include/stdint.h:87:27: note: expanded from macro 'UINT64_MAX' > #define UINT64_MAX 18446744073709551615ULL > ^~~~~~~~~~~~~~~~~~~~~~~ >=20 > This is a bug in the OSX system headers, but we need to work around > it. This came up last year for some other format strings in the > some source file, so the same fix should be ok here: > https://patchwork.ozlabs.org/patch/542327/ Back then, our "fix" was a hack to add an explicit (uint64_t) cast at the point of the printf, but that doesn't scale. Wouldn't a better fix be to osdep.h to add something along the lines of: #if witness_for_buggy_header #undef SIZE_MAX #define SIZE_MAX working expression #endif so that it is fixed in one place for all uses? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --pnEckcHcO6HBIv7TlK35UXF0RpPk6Frow 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/ iQEcBAEBCAAGBQJXg8iCAAoJEKeha0olJ0NqiHQH/RDlE371/DdcPZ+kyEBAM6Rr 99/NH0jbsY9Mjf9M4nJgyDWBeHyIcLGK0T2ugl2IiVvo2HmyQOKhngcnbInZACDy qAxIySygI7OeS/IJUfQaR6JNKChuteR1QU2EF5XQrN6h59wMRcuvRdYdxjderp7V 6Ri3U49Wtfh1FUOPQHe7udU6mxxSOnLXua5gZa157zck6OgR1EmAAQagR6CNuXOs p0Jaj8JfJKT8wgkt5h806vzHZfG0oqnMyiYfvOs6vNPfsuFYj2Dfx2pJlbdixfII 6bvs5soxnEEGDJyHzfjzqH4YtO5Myp89pswGBDuRnOio97kkHUbqLfCWZ8fAhFg= =cCQ9 -----END PGP SIGNATURE----- --pnEckcHcO6HBIv7TlK35UXF0RpPk6Frow--