[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/14] gcc extra warning fixes
From: |
Jes Sorensen |
Subject: |
Re: [Qemu-devel] [PATCH 00/14] gcc extra warning fixes |
Date: |
Tue, 31 Aug 2010 09:21:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Lightning/1.0b2pre Thunderbird/3.1.2 |
On 08/30/10 21:25, Blue Swirl wrote:
> On Mon, Aug 30, 2010 at 3:35 PM, <address@hidden> wrote:
>> From: Jes Sorensen <address@hidden>
>>
>> Hi,
>>
>> I started building QEMU with some more aggressive error flags to see
>> what dropped out. I started fixing up some of the cases, removing
>> unused arguments to functions, comparisons of unsigned types against
>> negative values etc. and a few other minor changes to avoid compiler
>> warnings.
>
> If the patches make all such warnings disappear, you could also
> consider the same approach as taken by
> 7ccfb2eb5f9d91bdb4139cb420a3b5f8deb2f6e8 and
> ac41a6206fe9e1506010cd0aa9cf56ed3b37ae19.
>
> If a GCC flag can be enabled, it should not be just -Wextra, because
> that means different things on different GCC versions, so please check
> also
> a316e3788df2781fda119e801e9b3d753f89b752.
The one GCC flag I think we should enable, and probably was the one that
caught the most bugs in my patch set is this one: -Wtype-limits
There was only one false positive with this flag in block/blkdebug.c
where it bails on a < 0 comparison of an enum. enum doesn't seem to be
defined to being signed or unsigned, but a quick cast in that case would
make that single false positive go away.
Cheers,
Jes
- [Qemu-devel] Re: [PATCH 04/14] Zero initialize timespec struct explicitly, (continued)
- [Qemu-devel] Re: [PATCH 04/14] Zero initialize timespec struct explicitly, Anthony Liguori, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 04/14] Zero initialize timespec struct explicitly, malc, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 04/14] Zero initialize timespec struct explicitly, Jes Sorensen, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 04/14] Zero initialize timespec struct explicitly, Anthony Liguori, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 04/14] Zero initialize timespec struct explicitly, malc, 2010/08/30
[Qemu-devel] [PATCH 12/14] size_t is unsigned, so (foo >= 0) is always true, Jes . Sorensen, 2010/08/30
Re: [Qemu-devel] [PATCH 00/14] gcc extra warning fixes, Blue Swirl, 2010/08/30
- Re: [Qemu-devel] [PATCH 00/14] gcc extra warning fixes,
Jes Sorensen <=