Mike McCormack wrote:
ChangeLog:
- fix gcc 4.0 -Wpointer-sign warnings
Index: dlls/ole32/antimoniker.c
RCS file: /home/wine/wine/dlls/ole32/antimoniker.c,v retrieving revision 1.25 diff -u -p -r1.25 antimoniker.c --- dlls/ole32/antimoniker.c 6 Jun 2005 19:50:37 -0000 1.25 +++ dlls/ole32/antimoniker.c 4 Jul 2005 14:48:34 -0000 @@ -49,7 +49,7 @@ typedef struct AntiMonikerImpl{ */ const IROTDataVtbl* lpvtbl2; /* VTable relative to the IROTData interface.*/
- ULONG ref; /* reference counter for this object */
- LONG ref; /* reference counter for this object */
} AntiMonikerImpl;
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.
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