From c29892b88f9320042e5b727845ee7316b6055d69 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 12 Aug 2005 10:35:46 +0000 Subject: [PATCH] Fix some gcc 4.0 warnings. --- dlls/x11drv/clipboard.c | 2 +- dlls/x11drv/xdnd.c | 2 +- dlls/x11drv/xfont.c | 2 +- dlls/x11drv/xrandr.c | 2 +- dlls/x11drv/xrender.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/x11drv/clipboard.c b/dlls/x11drv/clipboard.c index 27fae3de70..01d2c9748c 100644 --- a/dlls/x11drv/clipboard.c +++ b/dlls/x11drv/clipboard.c @@ -1952,7 +1952,7 @@ static HANDLE X11DRV_CLIPBOARD_SerializeMetafile(INT wformat, HANDLE hdata, LPDW memcpy(lpmfp, (LPVOID)hdata, sizeof(METAFILEPICT)); wiresize = *lpcbytes - sizeof(METAFILEPICT); lpmfp->hMF = SetMetaFileBitsEx(wiresize, - ((const char *)hdata) + sizeof(METAFILEPICT)); + ((const BYTE *)hdata) + sizeof(METAFILEPICT)); size = GetMetaFileBitsEx(lpmfp->hMF, 0, NULL); GlobalUnlock(h); } diff --git a/dlls/x11drv/xdnd.c b/dlls/x11drv/xdnd.c index 7010b41843..f0b8c2a9c8 100644 --- a/dlls/x11drv/xdnd.c +++ b/dlls/x11drv/xdnd.c @@ -111,7 +111,7 @@ void X11DRV_XDND_EnterEvent( HWND hWnd, XClientMessageEvent *event ) else { count = 3; - xdndtypes = &event->data.l[2]; + xdndtypes = (Atom*) &event->data.l[2]; } if (TRACE_ON(xdnd)) diff --git a/dlls/x11drv/xfont.c b/dlls/x11drv/xfont.c index 70e5e7f27c..1a0d5aec1a 100644 --- a/dlls/x11drv/xfont.c +++ b/dlls/x11drv/xfont.c @@ -3410,7 +3410,7 @@ BOOL X11DRV_GetCharWidth( X11DRV_PDEVICE *physDev, UINT firstChar, UINT lastChar WCHAR wch = i; BYTE ch; UINT ch_f; /* character code in the font encoding */ - WideCharToMultiByte( pfo->fi->codepage, 0, &wch, 1, &ch, 1, NULL, NULL ); + WideCharToMultiByte( pfo->fi->codepage, 0, &wch, 1, (LPSTR)&ch, 1, NULL, NULL ); ch_f = ch; if (ch_f >= pfo->fs->min_char_or_byte2 && ch_f <= pfo->fs->max_char_or_byte2) diff --git a/dlls/x11drv/xrandr.c b/dlls/x11drv/xrandr.c index 138bf4d359..b6e5805d07 100644 --- a/dlls/x11drv/xrandr.c +++ b/dlls/x11drv/xrandr.c @@ -78,7 +78,7 @@ static LPDDHALMODEINFO dd_modes; static unsigned int dd_mode_count; static XRRScreenSize *real_xrandr_sizes; static short **real_xrandr_rates; -static unsigned int real_xrandr_sizes_count; +static int real_xrandr_sizes_count; static int *real_xrandr_rates_count; static unsigned int real_xrandr_modes_count; diff --git a/dlls/x11drv/xrender.c b/dlls/x11drv/xrender.c index cd3aa12caf..f27cca68ee 100644 --- a/dlls/x11drv/xrender.c +++ b/dlls/x11drv/xrender.c @@ -702,7 +702,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format) if(format == AA_None) { pitch = ((gi.width + 31) / 32) * 4; for(i = 0; i < gi.height; i++) { - line = buf + i * pitch; + line = (unsigned char*) buf + i * pitch; output[0] = '\0'; for(j = 0; j < pitch * 8; j++) { strcat(output, (line[j / 8] & (1 << (7 - (j % 8)))) ? "#" : " "); @@ -717,7 +717,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format) str[1] = '\0'; pitch = ((gi.width + 3) / 4) * 4; for(i = 0; i < gi.height; i++) { - line = buf + i * pitch; + line = (unsigned char*) buf + i * pitch; output[0] = '\0'; for(j = 0; j < pitch; j++) { str[0] = blks[line[j] >> 5]; @@ -731,7 +731,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format) if(formatEntry->glyphset) { if(format == AA_None && BitmapBitOrder(gdi_display) != MSBFirst) { - unsigned char *byte = buf, c; + unsigned char *byte = (unsigned char*) buf, c; int i = buflen; while(i--) { -- 2.32.0.93.g670b81a890