OLE32: fix gcc 4.0 -Wpointer-sign warnings
Mike McCormack
mike at codeweavers.com
Tue Jul 5 05:40:58 CDT 2005
Robert Shearman wrote:
>> - ULONG ref; /* reference counter for this object */
>> + LONG ref; /* reference counter for this object */
> IUnknown_AddRef and IUnknown_Release both return ULONGs so it looks like
> you are just moving the problem elsewhere. I think you should be casting
> the values passed into Interlocked{Increment,Decrement} or find some
> other nicer way of preventing that warning, possibly by ignoring them or
> just turning off the -Wpointer-sign flag.
I don't think the reference count will get over MAXINT and it shouldn't
go negative, so I can't see how this will cause a problem.
I already submitted a patch [1] to turn off -Wpointer-sign. Alexandre
prefered that we fix the warnings.
Mike
[1] http://www.winehq.org/hypermail/wine-patches/2005/07/0003.html
More information about the wine-devel
mailing list