From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi2AQ-0002s3-44 for qemu-devel@nongnu.org; Tue, 14 Apr 2015 10:50:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yi2AM-00074E-UN for qemu-devel@nongnu.org; Tue, 14 Apr 2015 10:50:22 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:37047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi2AM-000733-GO for qemu-devel@nongnu.org; Tue, 14 Apr 2015 10:50:18 -0400 Received: by widdi4 with SMTP id di4so25109730wid.0 for ; Tue, 14 Apr 2015 07:50:17 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <552D2924.5090502@redhat.com> Date: Tue, 14 Apr 2015 16:50:12 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1428523369-13700-1-git-send-email-peter.maydell@linaro.org> <552D1940.5030709@redhat.com> <552D2451.5040403@redhat.com> <552D25B2.4010002@redhat.com> In-Reply-To: <552D25B2.4010002@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qga/commands-posix.c: Use correct types with g_base64_decode() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Peter Maydell Cc: QEMU Developers , Michael Roth , Patch Tracking On 14/04/2015 16:35, Eric Blake wrote: > 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. Are there any? I don't think QEMU supports them anyway. Paolo > 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. >