Commit 82a3c433 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

winex11.drv: Remove some superfluous casts.

parent cc51c30a
......@@ -300,7 +300,7 @@ HBRUSH X11DRV_SelectBrush( X11DRV_PDEVICE *physDev, HBRUSH hbrush )
case BS_DIBPATTERN:
TRACE("BS_DIBPATTERN\n");
if ((bmpInfo = (BITMAPINFO *) GlobalLock16( (HGLOBAL16)logbrush.lbHatch )))
if ((bmpInfo = GlobalLock16( logbrush.lbHatch )))
{
int size = bitmap_info_size( bmpInfo, logbrush.lbColor );
hBitmap = CreateDIBitmap( physDev->hdc, &bmpInfo->bmiHeader,
......@@ -309,7 +309,7 @@ HBRUSH X11DRV_SelectBrush( X11DRV_PDEVICE *physDev, HBRUSH hbrush )
(WORD)logbrush.lbColor );
BRUSH_SelectPatternBrush( physDev, hBitmap );
DeleteObject( hBitmap );
GlobalUnlock16( (HGLOBAL16)logbrush.lbHatch );
GlobalUnlock16( logbrush.lbHatch );
}
break;
......
......@@ -705,7 +705,7 @@ static void X11DRV_CLIPBOARD_FreeData(LPWINE_CLIPDATA lpData)
if (lpData->hData16)
{
METAFILEPICT16* lpMetaPict = (METAFILEPICT16 *) GlobalLock16(lpData->hData16);
METAFILEPICT16* lpMetaPict = GlobalLock16(lpData->hData16);
if (lpMetaPict)
{
......@@ -970,11 +970,11 @@ static BOOL X11DRV_CLIPBOARD_RenderSynthesizedText(Display *display, UINT wForma
if (lpSource->hData32)
{
lpstrS = (LPSTR)GlobalLock(lpSource->hData32);
lpstrS = GlobalLock(lpSource->hData32);
}
else
{
lpstrS = (LPSTR)GlobalLock16(lpSource->hData16);
lpstrS = GlobalLock16(lpSource->hData16);
}
if (!lpstrS)
......@@ -1005,7 +1005,7 @@ static BOOL X11DRV_CLIPBOARD_RenderSynthesizedText(Display *display, UINT wForma
hData32 = GlobalAlloc(GMEM_ZEROINIT | GMEM_MOVEABLE |
GMEM_DDESHARE, alloc_size);
lpstrT = (LPSTR)GlobalLock(hData32);
lpstrT = GlobalLock(hData32);
if (lpstrT)
{
......@@ -1095,7 +1095,7 @@ static BOOL X11DRV_CLIPBOARD_RenderSynthesizedBitmap(Display *display)
LPBITMAPINFOHEADER lpbmih;
hdc = GetDC(NULL);
lpbmih = (LPBITMAPINFOHEADER) GlobalLock(lpSource->hData32);
lpbmih = GlobalLock(lpSource->hData32);
offset = sizeof(BITMAPINFOHEADER)
+ ((lpbmih->biBitCount <= 8) ? (sizeof(RGBQUAD) *
......@@ -1330,7 +1330,7 @@ HANDLE X11DRV_CLIPBOARD_ImportMetaFilePict(Display *display, Window w, Atom prop
if (X11DRV_CLIPBOARD_ReadProperty(display, w, prop, &lpdata, &cbytes))
{
if (cbytes)
hClipData = X11DRV_CLIPBOARD_SerializeMetafile(CF_METAFILEPICT, (HANDLE)lpdata, (LPDWORD)&cbytes, FALSE);
hClipData = X11DRV_CLIPBOARD_SerializeMetafile(CF_METAFILEPICT, lpdata, (LPDWORD)&cbytes, FALSE);
/* Free the retrieved property data */
HeapFree(GetProcessHeap(), 0, lpdata);
......@@ -1354,7 +1354,7 @@ HANDLE X11DRV_CLIPBOARD_ImportEnhMetaFile(Display *display, Window w, Atom prop)
if (X11DRV_CLIPBOARD_ReadProperty(display, w, prop, &lpdata, &cbytes))
{
if (cbytes)
hClipData = X11DRV_CLIPBOARD_SerializeMetafile(CF_ENHMETAFILE, (HANDLE)lpdata, (LPDWORD)&cbytes, FALSE);
hClipData = X11DRV_CLIPBOARD_SerializeMetafile(CF_ENHMETAFILE, lpdata, (LPDWORD)&cbytes, FALSE);
/* Free the retrieved property data */
HeapFree(GetProcessHeap(), 0, lpdata);
......@@ -2170,7 +2170,7 @@ static HANDLE X11DRV_CLIPBOARD_SerializeMetafile(INT wformat, HANDLE hdata, LPDW
if (wformat == CF_METAFILEPICT)
{
LPMETAFILEPICT lpmfp = (LPMETAFILEPICT) GlobalLock(hdata);
LPMETAFILEPICT lpmfp = GlobalLock(hdata);
unsigned int size = GetMetaFileBitsEx(lpmfp->hMF, 0, NULL);
h = GlobalAlloc(0, size + sizeof(METAFILEPICT));
......@@ -2212,7 +2212,7 @@ static HANDLE X11DRV_CLIPBOARD_SerializeMetafile(INT wformat, HANDLE hdata, LPDW
if (h)
{
unsigned int wiresize, size;
LPMETAFILEPICT lpmfp = (LPMETAFILEPICT) GlobalLock(h);
LPMETAFILEPICT lpmfp = GlobalLock(h);
memcpy(lpmfp, hdata, sizeof(METAFILEPICT));
wiresize = *lpcbytes - sizeof(METAFILEPICT);
......
......@@ -1143,7 +1143,7 @@ static void EVENT_DropFromOffiX( HWND hWnd, XClientMessageEvent *event )
aux_long += sizeof(DROPFILES) + 1;
hDrop = GlobalAlloc( GMEM_SHARE, aux_long );
lpDrop = (DROPFILES*)GlobalLock( hDrop );
lpDrop = GlobalLock( hDrop );
if( lpDrop )
{
......@@ -1237,7 +1237,7 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event )
drop_len += sizeof(DROPFILES) + 1;
hDrop = GlobalAlloc( GMEM_SHARE, drop_len );
lpDrop = (DROPFILES *) GlobalLock( hDrop );
lpDrop = GlobalLock( hDrop );
if( lpDrop && (win_data = X11DRV_get_win_data( hWnd )))
{
......
......@@ -2360,7 +2360,7 @@ static HPBUFFERARB WINAPI X11DRV_wglCreatePbufferARB(HDC hdc, int iPixelFormat,
goto create_failed; /* unexpected error */
}
TRACE("->(%p)\n", object);
return (HPBUFFERARB) object;
return object;
create_failed:
HeapFree(GetProcessHeap(), 0, object);
......
......@@ -141,7 +141,7 @@ static DWORD PASCAL X11DRV_DDHAL_CreateSurface(LPDDHAL_CREATESURFACEDATA data)
{
if (data->lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) {
X11DRV_DD_Primary = *data->lplpSList;
X11DRV_DD_PrimaryWnd = (HWND)X11DRV_DD_Primary->lpSurfMore->lpDDRAWReserved;
X11DRV_DD_PrimaryWnd = X11DRV_DD_Primary->lpSurfMore->lpDDRAWReserved;
X11DRV_DD_PrimaryGbl = X11DRV_DD_Primary->lpGbl;
SetPrimaryDIB((HBITMAP)GET_LPDDRAWSURFACE_GBL_MORE(X11DRV_DD_PrimaryGbl)->hKernelSurface);
X11DRV_DD_UserClass = GlobalFindAtomA("WINE_DDRAW");
......
......@@ -3117,7 +3117,7 @@ static X_PHYSFONT XFONT_RealizeFont( LPLOGFONT16 plf,
lfSub.lfCharSet = (BYTE)(charset_sub & 0xff);
lfSub.lfFaceName[0] = '\0'; /* FIXME? */
/* this font has sub font */
if ( i == 0 ) pfo->prefobjs[0] = (X_PHYSFONT)0;
if ( i == 0 ) pfo->prefobjs[0] = 0;
pfo->prefobjs[i] =
XFONT_RealizeFont( &lfSub, &faceMatchedSub,
TRUE, charset_sub,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment