gdi32: Remove superfluous pointer casts.

oldstable
Michael Stefaniuc 2009-01-26 11:01:12 +01:00 committed by Alexandre Julliard
parent 07a7c1f822
commit 667a1ed5be
12 changed files with 23 additions and 25 deletions

View File

@ -270,7 +270,7 @@ HBRUSH WINAPI CreateDIBPatternBrush( HGLOBAL hbitmap, UINT coloruse )
*/
HBRUSH WINAPI CreateDIBPatternBrushPt( const void* data, UINT coloruse )
{
const BITMAPINFO *info=(const BITMAPINFO*)data;
const BITMAPINFO *info=data;
LOGBRUSH logbrush;
if (!data)

View File

@ -382,7 +382,7 @@ static HDC GetDCState( HDC hdc )
newdc->vportExtY = dc->vportExtY;
newdc->BoundsRect = dc->BoundsRect;
newdc->hSelf = (HDC)handle;
newdc->hSelf = handle;
newdc->thread = GetCurrentThreadId();
newdc->refcount = 1;
newdc->saveLevel = 0;

View File

@ -616,8 +616,8 @@ INT WINAPI GetDIBits(
}
colorPtr = (LPBYTE) info + (WORD) info->bmiHeader.biSize;
rgbTriples = (RGBTRIPLE *) colorPtr;
rgbQuads = (RGBQUAD *) colorPtr;
rgbTriples = colorPtr;
rgbQuads = colorPtr;
/* Transfer color info */

View File

@ -2600,8 +2600,7 @@ static INT CALLBACK cbEnhPaletteCopy( HDC a,
TRACE( "copying 0x%08x palettes\n", dwNumPalToCopy );
memcpy( (LPVOID)info->lpPe,
(LPCVOID)(((LPCSTR)lpEof) + lpEof->offPalEntries),
memcpy( info->lpPe, (LPCSTR)lpEof + lpEof->offPalEntries,
sizeof( *(info->lpPe) ) * dwNumPalToCopy );
/* Update the passed data as a return code */

View File

@ -197,7 +197,7 @@ BOOL EMFDRV_WriteRecord( PHYSDEV dev, EMR *emr )
physDev->emh->nRecords++;
if(physDev->hFile) {
if (!WriteFile(physDev->hFile, (char *)emr, emr->nSize, NULL, NULL))
if (!WriteFile(physDev->hFile, emr, emr->nSize, NULL, NULL))
return FALSE;
} else {
DWORD nEmfSize = HeapSize(GetProcessHeap(), 0, physDev->emh);
@ -407,7 +407,7 @@ HDC WINAPI CreateEnhMetaFileW(
EMFDRV_DeleteDC( dc );
return 0;
}
if (!WriteFile( hFile, (LPSTR)physDev->emh, size, NULL, NULL )) {
if (!WriteFile( hFile, physDev->emh, size, NULL, NULL )) {
EMFDRV_DeleteDC( dc );
return 0;
}
@ -482,8 +482,8 @@ HENHMETAFILE WINAPI CloseEnhMetaFile(HDC hdc) /* [in] metafile DC */
return 0;
}
if (!WriteFile(physDev->hFile, (LPSTR)physDev->emh,
sizeof(*physDev->emh), NULL, NULL))
if (!WriteFile(physDev->hFile, physDev->emh, sizeof(*physDev->emh),
NULL, NULL))
{
CloseHandle( physDev->hFile );
EMFDRV_DeleteDC( dc );

View File

@ -920,8 +920,8 @@ BOOL WINAPI GetTextExtentExPointI( HDC hdc, const WORD *indices, INT count, INT
}
else if(dc->funcs->pGetTextExtentExPoint) {
FIXME("calling GetTextExtentExPoint\n");
ret = dc->funcs->pGetTextExtentExPoint( dc->physDev, (LPCWSTR)indices,
count, max_ext, nfit, dxs, size );
ret = dc->funcs->pGetTextExtentExPoint( dc->physDev, indices, count,
max_ext, nfit, dxs, size );
}
release_dc_ptr( dc );

View File

@ -4037,7 +4037,7 @@ static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
{
const GSUB_CoverageFormat1* cf1;
cf1 = (GSUB_CoverageFormat1*)table;
cf1 = table;
if (GET_BE_WORD(cf1->CoverageFormat) == 1)
{
@ -4806,7 +4806,7 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
if (!buf || !buflen) break;
memset(buf, 0, buflen);
dst = (unsigned int *)buf;
dst = buf;
rgb = (format == WINE_GGO_HRGB_BITMAP || format == WINE_GGO_VRGB_BITMAP);
if ( needsTransform )

View File

@ -804,8 +804,8 @@ BOOL WINAPI PlayMetaFileRecord( HDC hdc, HANDLETABLE *ht, METARECORD *mr, UINT
infohdr->biHeight,
infohdr->biPlanes,
infohdr->biBitCount,
(LPSTR)(mr->rdParm +
(sizeof(BITMAPINFOHEADER) / 2) + 4))));
mr->rdParm +
(sizeof(BITMAPINFOHEADER) / 2) + 4)));
break;
case BS_DIBPATTERN:
@ -928,7 +928,7 @@ BOOL WINAPI PlayMetaFileRecord( HDC hdc, HANDLETABLE *ht, METARECORD *mr, UINT
mr->rdParm[11], /*Height*/
mr->rdParm[13], /*Planes*/
mr->rdParm[14], /*BitsPixel*/
(LPSTR)&mr->rdParm[15]); /*bits*/
&mr->rdParm[15]); /*bits*/
SelectObject(hdcSrc,hbitmap);
StretchBlt(hdc, (SHORT)mr->rdParm[9], (SHORT)mr->rdParm[8],
(SHORT)mr->rdParm[7], (SHORT)mr->rdParm[6],
@ -946,7 +946,7 @@ BOOL WINAPI PlayMetaFileRecord( HDC hdc, HANDLETABLE *ht, METARECORD *mr, UINT
mr->rdParm[8]/*Height*/,
mr->rdParm[10]/*Planes*/,
mr->rdParm[11]/*BitsPixel*/,
(LPSTR)&mr->rdParm[12]/*bits*/);
&mr->rdParm[12]/*bits*/);
SelectObject(hdcSrc,hbitmap);
BitBlt(hdc,(SHORT)mr->rdParm[6],(SHORT)mr->rdParm[5],
(SHORT)mr->rdParm[4],(SHORT)mr->rdParm[3],

View File

@ -339,8 +339,8 @@ static DC *MFDRV_CloseMetaFile( HDC hdc )
}
physDev->mh->mtType = METAFILE_MEMORY; /* This is what windows does */
if (!WriteFile(physDev->hFile, (LPSTR)physDev->mh,
sizeof(*physDev->mh), NULL, NULL)) {
if (!WriteFile(physDev->hFile, physDev->mh, sizeof(*physDev->mh),
NULL, NULL)) {
MFDRV_DeleteDC( dc );
return 0;
}
@ -457,7 +457,7 @@ BOOL MFDRV_WriteRecord( PHYSDEV dev, METARECORD *mr, DWORD rlen)
break;
case METAFILE_DISK:
TRACE("Writing record to disk\n");
if (!WriteFile(physDev->hFile, (char *)mr, rlen, NULL, NULL))
if (!WriteFile(physDev->hFile, mr, rlen, NULL, NULL))
return FALSE;
break;
default:

View File

@ -520,7 +520,7 @@ HPALETTE CDECL MFDRV_SelectPalette( PHYSDEV dev, HPALETTE hPalette, BOOL bForceB
BOOL creationSucceed;
int sizeofPalette;
GetObjectA(hPalette, sizeof(WORD), (LPSTR) &wNumEntries);
GetObjectA(hPalette, sizeof(WORD), &wNumEntries);
if (wNumEntries == 0) return 0;

View File

@ -1430,8 +1430,7 @@ static void REGION_CopyRegion(WINEREGION *dst, WINEREGION *src)
dst->extents.top = src->extents.top;
dst->extents.right = src->extents.right;
dst->extents.bottom = src->extents.bottom;
memcpy((char *) dst->rects, (char *) src->rects,
(int) (src->numRects * sizeof(RECT)));
memcpy(dst->rects, src->rects, src->numRects * sizeof(RECT));
}
return;
}

View File

@ -110,7 +110,7 @@ struct hgdiobj_event
static DWORD WINAPI thread_proc(void *param)
{
LOGPEN lp;
struct hgdiobj_event *hgdiobj_event = (struct hgdiobj_event *)param;
struct hgdiobj_event *hgdiobj_event = param;
hgdiobj_event->hdc = CreateDC("display", NULL, NULL, NULL);
ok(hgdiobj_event->hdc != NULL, "CreateDC error %u\n", GetLastError());