[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} us
From: |
Thiemo Seufer |
Subject: |
Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter |
Date: |
Fri, 4 Jan 2008 16:14:15 +0000 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
Andreas Färber wrote:
>
> Am 04.01.2008 um 15:00 schrieb Samuel Thibault:
>
>> Andreas Färber, le Fri 04 Jan 2008 14:41:29 +0100, a écrit :
>>>
>>> Am 04.01.2008 um 14:20 schrieb Thiemo Seufer:
>>>
>>>> Carlo Marcelo Arenas Belon wrote:
>>>>> Trivial fix that ensures that all buffers used for bdrv_read or
>>>>> bdrv_write
>>>>> are from an array of the uint8_t type
>>>>
>>>> Do we have a host where this actually makes a difference?
>>>
>>> I believe Perl makes sizeof(char) checks, so there likely is some
>>> platform where sizeof(char) > 1.
>>
>> The C standard says
>>
>> `When applied to an operand that has type char, unsigned char, or signed
>> char, (or a qualified version thereof) the result is 1.'
AFAIR this is C99 ...
> The standard maybe. But Win64 violates the C standards, too. ;)
>
> According to our department's ANSI C course, the only consistent rule is
> sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)
> without any concrete numbers.
... and this is C89.
Thiemo
- [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter, Carlo Marcelo Arenas Belon, 2008/01/04
- Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter, Thiemo Seufer, 2008/01/04
- Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter, Andreas Färber, 2008/01/04
- Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter, Samuel Thibault, 2008/01/04
- Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter, Andreas Färber, 2008/01/04
- Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter,
Thiemo Seufer <=
- Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter, M. Warner Losh, 2008/01/04
- Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter, Andreas Schwab, 2008/01/04
- Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter, Rob Landley, 2008/01/04
- Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter, Carlo Marcelo Arenas Belon, 2008/01/04