[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prot
From: |
Filip Navara |
Subject: |
Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static |
Date: |
Sun, 8 Mar 2009 17:01:17 +0100 |
On Sun, Mar 8, 2009 at 4:36 PM, Blue Swirl <address@hidden> wrote:
> On 3/8/09, Anthony Liguori <address@hidden> wrote:
>> Blue Swirl wrote:
>>
>> > Revision: 6736
>> >
>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6736
>> > Author: blueswir1
>> > Date: 2009-03-07 15:32:56 +0000 (Sat, 07 Mar 2009)
>> > Log Message:
>> > -----------
>> > Sparse fixes: NULL use, header order, ANSI prototypes, static
>> >
>> > Fix Sparse warnings:
>> > * use NULL instead of plain 0
>> > * rearrange header include order to avoid redefining types accidentally
>> > * ANSIfy SLIRP
>> > * avoid "restrict" keyword
>> > * add static
>> >
>> >
>>
>> This broke the Windows build. The reason is that you moved all system
>> headers to be included before any QEMU headers. While I agree with this in
>> principle, Windows headers are sloppy and don't include their dependencies.
>> Right now, we rely on qemu-common.h being included in the top in order to
>> get #include <windows.h> every where.
>>
>> To complicate matters further, we define some special versioning magic to
>> get windows IPv6 support working. I don't want to add that full blob to
>> every .c file so it makes sense to use a qemu include file (like
>> qemu-common.h). That defeats that purpose of your refactoring though so I
>> wanted to see what you thought about it.
>
> Taking vl.c as an example, do you mean that even these headers:
> #include <unistd.h>
> #include <fcntl.h>
> #include <signal.h>
> #include <time.h>
> #include <errno.h>
> #include <sys/time.h>
> #include <zlib.h>
> before config-host.h line are now broken because of missing windows.h
> include? Or is it just some header below that?
Only mmsystem.h as far as I can see... which is also needlessly
included in many files (savecm.c, net.c).
F.
- [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static, Blue Swirl, 2009/03/07
- Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static, Anthony Liguori, 2009/03/08
- Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static, Blue Swirl, 2009/03/08
- Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static,
Filip Navara <=
- Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static, Anthony Liguori, 2009/03/08
- Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static, Blue Swirl, 2009/03/08
- Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static, Anthony Liguori, 2009/03/08