Fix Sparse Warnings for server/

Alexandre Julliard julliard at
Mon May 23 10:50:48 CDT 2005

Robert Shearman <rob at> writes:

> Alexandre Julliard wrote:
> >sparse should be taught that 0 is a perfectly fine value (and IMO
> >preferable to NULL) for handles.
> I don't really understand this reasoning. Should gcc also be taught
> not to warn when we try to assign -1 to a handle? Are we using the
> wrong type for usr_handle_t then?

In a sense, yes. Handles are conceptually much closer to integers than
pointers, but they are pointers in the Windows API so that the
different handles can have distinct types. It's really just a
workaround for the fact that all integer types are freely
interchangeable in C.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list