X11DRV: more gcc 4.0 warning fixes
Alexandre Julliard
julliard at winehq.org
Mon Aug 22 05:12:15 CDT 2005
Mike McCormack <mike at codeweavers.com> writes:
> Index: dlls/x11drv/event.c
> ===================================================================
> RCS file: /home/mike/src/wine-cvs/wine/dlls/x11drv/event.c,v
> retrieving revision 1.58
> diff -u -p -r1.58 event.c
> --- dlls/x11drv/event.c 16 Aug 2005 16:02:45 -0000 1.58
> +++ dlls/x11drv/event.c 17 Aug 2005 01:09:41 -0000
> @@ -698,7 +698,7 @@ static void EVENT_DropFromOffiX( HWND hW
>
> if( !aux_long && p_data) /* don't bother if > 64K */
> {
> - signed char *p = (signed char*) p_data;
> + char *p = (char*) p_data;
> char *p_drop;
>
> aux_long = 0;
The code is storing -1 in there so it has to be a signed char (though
that algorithm is really a nasty hack that should be fixed properly).
> --- dlls/x11drv/text.c 23 Dec 2004 20:31:56 -0000 1.15
> +++ dlls/x11drv/text.c 16 Aug 2005 01:53:53 -0000
> @@ -390,7 +390,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physD
> wine_tsx11_lock();
> if (lfUnderline)
> {
> - long linePos, lineWidth;
> + unsigned long linePos, lineWidth;
>
> if (!XGetFontProperty( font, XA_UNDERLINE_POSITION, &linePos ))
> linePos = descent - 1;
> @@ -405,7 +405,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physD
> }
> if (lfStrikeOut)
> {
> - long lineAscent, lineDescent;
> + unsigned long lineAscent, lineDescent;
> if (!XGetFontProperty( font, XA_STRIKEOUT_ASCENT, &lineAscent ))
> lineAscent = ascent / 2;
> if (!XGetFontProperty( font, XA_STRIKEOUT_DESCENT, &lineDescent ))
I think these should remain signed too, especially since lineDescent
is set to -lineAscent.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list