From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Cc: Patch Tracking <patches@linaro.org>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] qga/commands-posix.c: Use correct types with g_base64_decode()
Date: Tue, 14 Apr 2015 08:35:30 -0600 [thread overview]
Message-ID: <552D25B2.4010002@redhat.com> (raw)
In-Reply-To: <552D2451.5040403@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
On 04/14/2015 08:29 AM, Paolo Bonzini wrote:
> But you can: gsize is defined to be "An unsigned integer type of the
> result of the sizeof operator, corresponding to the size_t type defined
> in C99.
Good so far.
> This type is wide enough to hold the numeric value of a pointer,
Not true on platforms where size_t is 32 bits but pointers are 64 bits.
Bug in glib documentation.
>
> If anything, I would add a QEMU_BUILD_BUG_ON(sizeof(gsize) !=
> sizeof(size_t)) to catch the problem, since we've had many experienced
> developers caught unprepared.
That would be my preference as well.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-04-14 14:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 20:02 [Qemu-devel] [PATCH] qga/commands-posix.c: Use correct types with g_base64_decode() Peter Maydell
2015-04-08 20:14 ` Michael Roth
2015-04-14 13:38 ` Thomas Huth
2015-04-14 13:41 ` Peter Maydell
2015-04-14 14:30 ` Paolo Bonzini
2015-04-14 13:42 ` Paolo Bonzini
2015-04-14 13:45 ` Peter Maydell
2015-04-14 14:29 ` Paolo Bonzini
2015-04-14 14:35 ` Eric Blake [this message]
2015-04-14 14:50 ` Paolo Bonzini
2015-04-14 15:12 ` Eric Blake
2015-04-14 14:36 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=552D25B2.4010002@redhat.com \
--to=eblake@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).