[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block: fix a warning and possible truncation
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH] block: fix a warning and possible truncation |
Date: |
Tue, 15 Jun 2010 11:59:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Thunderbird/3.0.4 |
Am 15.06.2010 11:52, schrieb Alexander Graf:
>
> Am 14.06.2010 um 20:55 schrieb Blue Swirl <address@hidden>:
>
>> Fix a warning from OpenBSD gcc (3.3.5 (propolice)):
>> /src/qemu/block.c: In function `bdrv_info_stats_bs':
>> /src/qemu/block.c:1548: warning: long long int format, long unsigned
>> int arg (arg 6)
>>
>> There may be also truncation effects.
>>
>> Signed-off-by: Blue Swirl <address@hidden>
>> ---
>> Alternatively 'ULL' prefix could be appended to BDRV_SECTOR_SIZE
>> definition but that may have other side effects.
>
> ... Which are probably wanted. If there are more truncations, we want
> to catch them early, no?
Actually, it's there:
#define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS)
That compiler warning doesn't make any sense to me.
Kevin