[MPlayer-dev-eng] Re: [PATCH] loader compiler warnings

D Richard Felker III dalias at aerifal.cx
Fri Apr 9 14:38:38 CEST 2004


On Fri, Apr 09, 2004 at 11:01:56AM +0200, Dominik 'Rathann' Mierzejewski wrote:
> On Friday, 09 April 2004 at 07:42, adland wrote:
> > > If HANDLE isn't a pointer type, then casting NULL to a HANDLE is even
> > > more dumb. You should return 0.
> > 
> > looked into the file loader/wine/windef.h to see the definition
> > 
> > it is somewhat complicated it may be a pointer in some cases.
> [...]
> > seems to have a definition which depends on STRICT
> > which is only true if sizeof (UINT) == sizeof (void*)
> > according to the text
> 
> Thanks for bringing that up, I forgot about that. So, casting NULL to HANDLE
> is not so dumb after all. ;)

No, it's always dumb. Regardless of sizes, (HANDLE)0 or just 0 (which
will automatically be converted to HANDLE is always the correct way.

Rich




More information about the MPlayer-dev-eng mailing list