winetest: Annotate xmalloc() and xrealloc() with allocation size attribute.

Francois Gouget fgouget at free.fr
Wed Feb 18 04:20:11 CST 2009


On Tue, 17 Feb 2009, Steven Edwards wrote:

> On Tue, Feb 17, 2009 at 12:51 PM, Francois Gouget <fgouget at free.fr> wrote:
> > ---
> >
> > I moved them after the windows.h include though in practice the needed
> > winnt.h has already been included by the time we include winetest.h. So
> > maybe windows.h should be nuked altogether...
> 
> Conversely maybe using windows.h usage should be fixed and used more
> often. Wine is an oddball when it comes to win32 program with the
> excessive lengths it goes to, to avoid using windows.h. I am starting
> to think even avoiding it internally like we do causes more harm than
> good as far as being source compatible with MSVC.

My remark was not so much about including windows.h rather than 
winfoo.h, but about including it in winetest.h when the parent C file 
has already included the winxxx.h files it needs. That is, in Wine it 
seems we have a policy to put include statements primarily in the C 
files, rather than in private header files.

Also:
 * I don't see what depends on windows.h in winietest.h (besides my 
   newly added annotations).
 * if I remember correctly, removing this include did not cause any 
   warning or compilation error (even with my newly added annotations). 
   But maybe it's different if you compile with MinGW or MSVC (in which 
   case Wine's headers should be fixed).

-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
     Linux, WinNT, MS-DOS - also known as the Good, the Bad and the Ugly.



More information about the wine-devel mailing list