OLE32: fix gcc 4.0 -Wpointer-sign warnings

Robert Shearman rob at codeweavers.com
Mon Jul 4 20:28:59 CDT 2005


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.

-- 
Rob Shearman




More information about the wine-devel mailing list