qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qga/commands-posix.c: Use correct types with g_


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] qga/commands-posix.c: Use correct types with g_base64_decode()
Date: Tue, 14 Apr 2015 16:50:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


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.
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]