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