Commit a2187cad authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

winex11.drv: Remove superfluous pointer casts.

parent 14b136ca
...@@ -352,7 +352,7 @@ static int *X11DRV_DIB_GenColorMap( X11DRV_PDEVICE *physDev, int *colorMapping, ...@@ -352,7 +352,7 @@ static int *X11DRV_DIB_GenColorMap( X11DRV_PDEVICE *physDev, int *colorMapping,
{ {
if (quads) if (quads)
{ {
const RGBQUAD * rgb = (const RGBQUAD *)colorPtr; const RGBQUAD * rgb = colorPtr;
if (depth == 1) /* Monochrome */ if (depth == 1) /* Monochrome */
{ {
...@@ -376,7 +376,7 @@ static int *X11DRV_DIB_GenColorMap( X11DRV_PDEVICE *physDev, int *colorMapping, ...@@ -376,7 +376,7 @@ static int *X11DRV_DIB_GenColorMap( X11DRV_PDEVICE *physDev, int *colorMapping,
} }
else else
{ {
const RGBTRIPLE * rgb = (const RGBTRIPLE *)colorPtr; const RGBTRIPLE * rgb = colorPtr;
if (depth == 1) /* Monochrome */ if (depth == 1) /* Monochrome */
{ {
...@@ -401,7 +401,7 @@ static int *X11DRV_DIB_GenColorMap( X11DRV_PDEVICE *physDev, int *colorMapping, ...@@ -401,7 +401,7 @@ static int *X11DRV_DIB_GenColorMap( X11DRV_PDEVICE *physDev, int *colorMapping,
} }
else /* DIB_PAL_COLORS */ else /* DIB_PAL_COLORS */
{ {
const WORD * index = (const WORD *)colorPtr; const WORD * index = colorPtr;
for (i = start; i < end; i++, index++) for (i = start; i < end; i++, index++)
colorMapping[i] = X11DRV_PALETTE_ToPhysical( physDev, PALETTEINDEX(*index) ); colorMapping[i] = X11DRV_PALETTE_ToPhysical( physDev, PALETTEINDEX(*index) );
...@@ -4102,7 +4102,7 @@ INT CDECL X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT start ...@@ -4102,7 +4102,7 @@ INT CDECL X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT start
int num_colors = 1 << descr.infoBpp, i; int num_colors = 1 << descr.infoBpp, i;
RGBQUAD *rgb; RGBQUAD *rgb;
COLORREF colref; COLORREF colref;
WORD *index = (WORD*)colorPtr; WORD *index = colorPtr;
descr.colorMap = rgb = HeapAlloc(GetProcessHeap(), 0, num_colors * sizeof(RGBQUAD)); descr.colorMap = rgb = HeapAlloc(GetProcessHeap(), 0, num_colors * sizeof(RGBQUAD));
for(i = 0; i < num_colors; i++, rgb++, index++) { for(i = 0; i < num_colors; i++, rgb++, index++) {
colref = X11DRV_PALETTE_ToLogical(X11DRV_PALETTE_ToPhysical(physDev, PALETTEINDEX(*index))); colref = X11DRV_PALETTE_ToLogical(X11DRV_PALETTE_ToPhysical(physDev, PALETTEINDEX(*index)));
......
...@@ -109,7 +109,7 @@ static LPINPUTCONTEXT LockRealIMC(HIMC hIMC) ...@@ -109,7 +109,7 @@ static LPINPUTCONTEXT LockRealIMC(HIMC hIMC)
{ {
HIMC real_imc = RealIMC(hIMC); HIMC real_imc = RealIMC(hIMC);
if (real_imc) if (real_imc)
return (LPINPUTCONTEXT)ImmLockIMC(real_imc); return ImmLockIMC(real_imc);
else else
return NULL; return NULL;
} }
......
...@@ -334,7 +334,7 @@ INT CDECL X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, L ...@@ -334,7 +334,7 @@ INT CDECL X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, L
case X11DRV_SET_DRAWABLE: case X11DRV_SET_DRAWABLE:
if (in_count >= sizeof(struct x11drv_escape_set_drawable)) if (in_count >= sizeof(struct x11drv_escape_set_drawable))
{ {
const struct x11drv_escape_set_drawable *data = (const struct x11drv_escape_set_drawable *)in_data; const struct x11drv_escape_set_drawable *data = in_data;
if(physDev->xrender) X11DRV_XRender_UpdateDrawable( physDev ); if(physDev->xrender) X11DRV_XRender_UpdateDrawable( physDev );
physDev->dc_rect = data->dc_rect; physDev->dc_rect = data->dc_rect;
physDev->drawable = data->drawable; physDev->drawable = data->drawable;
......
...@@ -1923,7 +1923,7 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD ...@@ -1923,7 +1923,7 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
if (GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, size, bitmap, NULL) == GDI_ERROR) goto error; if (GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, size, bitmap, NULL) == GDI_ERROR) goto error;
if (TRACE_ON(wgl)) { if (TRACE_ON(wgl)) {
unsigned int height, width, bitmask; unsigned int height, width, bitmask;
unsigned char *bitmap_ = (unsigned char *) bitmap; unsigned char *bitmap_ = bitmap;
TRACE(" - bbox : %d x %d\n", gm.gmBlackBoxX, gm.gmBlackBoxY); TRACE(" - bbox : %d x %d\n", gm.gmBlackBoxX, gm.gmBlackBoxY);
TRACE(" - origin : (%d , %d)\n", gm.gmptGlyphOrigin.x, gm.gmptGlyphOrigin.y); TRACE(" - origin : (%d , %d)\n", gm.gmptGlyphOrigin.x, gm.gmptGlyphOrigin.y);
...@@ -2374,7 +2374,7 @@ create_failed: ...@@ -2374,7 +2374,7 @@ create_failed:
*/ */
static GLboolean WINAPI X11DRV_wglDestroyPbufferARB(HPBUFFERARB hPbuffer) static GLboolean WINAPI X11DRV_wglDestroyPbufferARB(HPBUFFERARB hPbuffer)
{ {
Wine_GLPBuffer* object = (Wine_GLPBuffer*) hPbuffer; Wine_GLPBuffer* object = hPbuffer;
TRACE("(%p)\n", hPbuffer); TRACE("(%p)\n", hPbuffer);
if (NULL == object) { if (NULL == object) {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
...@@ -2397,7 +2397,7 @@ static GLboolean WINAPI X11DRV_wglDestroyPbufferARB(HPBUFFERARB hPbuffer) ...@@ -2397,7 +2397,7 @@ static GLboolean WINAPI X11DRV_wglDestroyPbufferARB(HPBUFFERARB hPbuffer)
*/ */
HDC CDECL X11DRV_wglGetPbufferDCARB(X11DRV_PDEVICE *physDev, HPBUFFERARB hPbuffer) HDC CDECL X11DRV_wglGetPbufferDCARB(X11DRV_PDEVICE *physDev, HPBUFFERARB hPbuffer)
{ {
Wine_GLPBuffer* object = (Wine_GLPBuffer*) hPbuffer; Wine_GLPBuffer* object = hPbuffer;
if (NULL == object) { if (NULL == object) {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return NULL; return NULL;
...@@ -2421,7 +2421,7 @@ HDC CDECL X11DRV_wglGetPbufferDCARB(X11DRV_PDEVICE *physDev, HPBUFFERARB hPbuffe ...@@ -2421,7 +2421,7 @@ HDC CDECL X11DRV_wglGetPbufferDCARB(X11DRV_PDEVICE *physDev, HPBUFFERARB hPbuffe
*/ */
static GLboolean WINAPI X11DRV_wglQueryPbufferARB(HPBUFFERARB hPbuffer, int iAttribute, int *piValue) static GLboolean WINAPI X11DRV_wglQueryPbufferARB(HPBUFFERARB hPbuffer, int iAttribute, int *piValue)
{ {
Wine_GLPBuffer* object = (Wine_GLPBuffer*) hPbuffer; Wine_GLPBuffer* object = hPbuffer;
TRACE("(%p, 0x%x, %p)\n", hPbuffer, iAttribute, piValue); TRACE("(%p, 0x%x, %p)\n", hPbuffer, iAttribute, piValue);
if (NULL == object) { if (NULL == object) {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
...@@ -2564,7 +2564,7 @@ static int WINAPI X11DRV_wglReleasePbufferDCARB(HPBUFFERARB hPbuffer, HDC hdc) ...@@ -2564,7 +2564,7 @@ static int WINAPI X11DRV_wglReleasePbufferDCARB(HPBUFFERARB hPbuffer, HDC hdc)
*/ */
static GLboolean WINAPI X11DRV_wglSetPbufferAttribARB(HPBUFFERARB hPbuffer, const int *piAttribList) static GLboolean WINAPI X11DRV_wglSetPbufferAttribARB(HPBUFFERARB hPbuffer, const int *piAttribList)
{ {
Wine_GLPBuffer* object = (Wine_GLPBuffer*) hPbuffer; Wine_GLPBuffer* object = hPbuffer;
GLboolean ret = GL_FALSE; GLboolean ret = GL_FALSE;
WARN("(%p, %p): alpha-testing, report any problem\n", hPbuffer, piAttribList); WARN("(%p, %p): alpha-testing, report any problem\n", hPbuffer, piAttribList);
...@@ -2956,7 +2956,7 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelF ...@@ -2956,7 +2956,7 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelF
*/ */
static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuffer) static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuffer)
{ {
Wine_GLPBuffer* object = (Wine_GLPBuffer*) hPbuffer; Wine_GLPBuffer* object = hPbuffer;
GLboolean ret = GL_FALSE; GLboolean ret = GL_FALSE;
TRACE("(%p, %d)\n", hPbuffer, iBuffer); TRACE("(%p, %d)\n", hPbuffer, iBuffer);
...@@ -3051,7 +3051,7 @@ static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuf ...@@ -3051,7 +3051,7 @@ static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuf
*/ */
static GLboolean WINAPI X11DRV_wglReleaseTexImageARB(HPBUFFERARB hPbuffer, int iBuffer) static GLboolean WINAPI X11DRV_wglReleaseTexImageARB(HPBUFFERARB hPbuffer, int iBuffer)
{ {
Wine_GLPBuffer* object = (Wine_GLPBuffer*) hPbuffer; Wine_GLPBuffer* object = hPbuffer;
GLboolean ret = GL_FALSE; GLboolean ret = GL_FALSE;
TRACE("(%p, %d)\n", hPbuffer, iBuffer); TRACE("(%p, %d)\n", hPbuffer, iBuffer);
......
...@@ -375,7 +375,7 @@ INT X11DRV_DCICommand(INT cbInput, const DCICMD *lpCmd, LPVOID lpOutData) ...@@ -375,7 +375,7 @@ INT X11DRV_DCICommand(INT cbInput, const DCICMD *lpCmd, LPVOID lpOutData)
return TRUE; return TRUE;
case DDVERSIONINFO: case DDVERSIONINFO:
{ {
LPDDVERSIONDATA lpVer = (LPDDVERSIONDATA)lpOutData; LPDDVERSIONDATA lpVer = lpOutData;
ddraw_ver = lpCmd->dwParam1; ddraw_ver = lpCmd->dwParam1;
if (!lpVer) break; if (!lpVer) break;
/* well, whatever... the DDK says so */ /* well, whatever... the DDK says so */
...@@ -396,7 +396,7 @@ INT X11DRV_DCICommand(INT cbInput, const DCICMD *lpCmd, LPVOID lpOutData) ...@@ -396,7 +396,7 @@ INT X11DRV_DCICommand(INT cbInput, const DCICMD *lpCmd, LPVOID lpOutData)
return TRUE; return TRUE;
case DDCREATEDRIVEROBJECT: case DDCREATEDRIVEROBJECT:
{ {
LPDWORD lpInstance = (LPDWORD)lpOutData; LPDWORD lpInstance = lpOutData;
/* FIXME: get x11drv's hInstance */ /* FIXME: get x11drv's hInstance */
X11DRV_Settings_CreateDriver(&hal_info); X11DRV_Settings_CreateDriver(&hal_info);
......
...@@ -355,7 +355,7 @@ static int X11DRV_XDND_MapFormat(unsigned int property, unsigned char *data, int ...@@ -355,7 +355,7 @@ static int X11DRV_XDND_MapFormat(unsigned int property, unsigned char *data, int
*/ */
static int X11DRV_XDND_DeconstructTextURIList(int property, void* data, int len) static int X11DRV_XDND_DeconstructTextURIList(int property, void* data, int len)
{ {
char *uriList = (char*) data; char *uriList = data;
char *uri; char *uri;
WCHAR *path; WCHAR *path;
...@@ -444,7 +444,7 @@ static int X11DRV_XDND_DeconstructTextPlain(int property, void* data, int len) ...@@ -444,7 +444,7 @@ static int X11DRV_XDND_DeconstructTextPlain(int property, void* data, int len)
char* dostext; char* dostext;
/* Always supply plain text */ /* Always supply plain text */
X11DRV_XDND_UnixToDos(&dostext, (char*)data, len); X11DRV_XDND_UnixToDos(&dostext, data, len);
X11DRV_XDND_InsertXDNDData(property, CF_TEXT, dostext, strlen(dostext)); X11DRV_XDND_InsertXDNDData(property, CF_TEXT, dostext, strlen(dostext));
TRACE("CF_TEXT (%d): %s\n", CF_TEXT, dostext); TRACE("CF_TEXT (%d): %s\n", CF_TEXT, dostext);
...@@ -494,7 +494,7 @@ static void X11DRV_XDND_SendDropFiles(HWND hwnd) ...@@ -494,7 +494,7 @@ static void X11DRV_XDND_SendDropFiles(HWND hwnd)
if (current != NULL) if (current != NULL)
{ {
DROPFILES *lpDrop = (DROPFILES*) current->data; DROPFILES *lpDrop = current->data;
if (lpDrop) if (lpDrop)
{ {
......
...@@ -421,7 +421,7 @@ static UINT16 __lfCheckSum( const LOGFONT16 *plf ) ...@@ -421,7 +421,7 @@ static UINT16 __lfCheckSum( const LOGFONT16 *plf )
static UINT16 __genericCheckSum( const void *ptr, int size ) static UINT16 __genericCheckSum( const void *ptr, int size )
{ {
unsigned int checksum = 0; unsigned int checksum = 0;
const char *p = (const char *)ptr; const char *p = ptr;
while (size-- > 0) while (size-- > 0)
checksum ^= (checksum << 3) + (checksum >> 29) + *p++; checksum ^= (checksum << 3) + (checksum >> 29) + *p++;
......
...@@ -154,7 +154,7 @@ static BOOL X11DRV_ImmSetInternalString(DWORD dwIndex, DWORD dwOffset, ...@@ -154,7 +154,7 @@ static BOOL X11DRV_ImmSetInternalString(DWORD dwIndex, DWORD dwOffset,
} }
} }
rc = IME_SetCompositionString(SCS_SETSTR, (LPWSTR)CompositionString, rc = IME_SetCompositionString(SCS_SETSTR, CompositionString,
dwCompStringLength, NULL, 0); dwCompStringLength, NULL, 0);
} }
else if ((dwIndex == GCS_RESULTSTR) && (lpComp) && (dwCompLen)) else if ((dwIndex == GCS_RESULTSTR) && (lpComp) && (dwCompLen))
...@@ -165,7 +165,7 @@ static BOOL X11DRV_ImmSetInternalString(DWORD dwIndex, DWORD dwOffset, ...@@ -165,7 +165,7 @@ static BOOL X11DRV_ImmSetInternalString(DWORD dwIndex, DWORD dwOffset,
ResultString= HeapAlloc(GetProcessHeap(),0,byte_length); ResultString= HeapAlloc(GetProcessHeap(),0,byte_length);
memcpy(ResultString,lpComp,byte_length); memcpy(ResultString,lpComp,byte_length);
rc = IME_SetCompositionString(SCS_SETSTR, (LPWSTR)ResultString, rc = IME_SetCompositionString(SCS_SETSTR, ResultString,
dwResultStringSize, NULL, 0); dwResultStringSize, NULL, 0);
IME_NotifyIME( NI_COMPOSITIONSTR, CPS_COMPLETE, 0); IME_NotifyIME( NI_COMPOSITIONSTR, CPS_COMPLETE, 0);
......
...@@ -1081,7 +1081,7 @@ static void SmoothGlyphGray(XImage *image, int x, int y, void *bitmap, XGlyphInf ...@@ -1081,7 +1081,7 @@ static void SmoothGlyphGray(XImage *image, int x, int y, void *bitmap, XGlyphInf
width = gi->width; width = gi->width;
height = gi->height; height = gi->height;
maskLine = (unsigned char *) bitmap; maskLine = bitmap;
maskStride = (width + 3) & ~3; maskStride = (width + 3) & ~3;
ExamineBitfield (image->red_mask, &r_shift, &r_len); ExamineBitfield (image->red_mask, &r_shift, &r_len);
......
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