Commit 8fde5bf8 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

winmm: Remove superfluous pointer casts.

parent 1ac7bafc
......@@ -69,7 +69,7 @@ static void DRIVER_Dump(const char *comment)
for (lpDrv = lpDrvItemList; lpDrv != NULL; lpDrv = lpDrv->lpNextItem)
{
TRACE("%p, magic %04lx, id %p, next %p\n", lpDrv, lpDrv->dwMagic, (void *)lpDrv->d.d32.dwDriverID, lpDrv->lpNextItem);
TRACE("%p, magic %04lx, id %p, next %p\n", lpDrv, lpDrv->dwMagic, lpDrv->d.d32.dwDriverID, lpDrv->lpNextItem);
}
LeaveCriticalSection( &mmdriver_lock );
......@@ -143,10 +143,10 @@ static inline LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg,
ret = pFnSendMessage16(lpDrv->d.d16.hDriver16, msg, lParam1, lParam2);
} else {
TRACE("Before call32 proc=%p drvrID=%08lx hDrv=%p wMsg=%04x p1=%08lx p2=%08lx\n",
lpDrv->d.d32.lpDrvProc, lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2);
lpDrv->d.d32.lpDrvProc, lpDrv->d.d32.dwDriverID, lpDrv, msg, lParam1, lParam2);
ret = lpDrv->d.d32.lpDrvProc(lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2);
TRACE("After call32 proc=%p drvrID=%08lx hDrv=%p wMsg=%04x p1=%08lx p2=%08lx => %08lx\n",
lpDrv->d.d32.lpDrvProc, lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2, ret);
lpDrv->d.d32.lpDrvProc, lpDrv->d.d32.dwDriverID, lpDrv, msg, lParam1, lParam2, ret);
}
return ret;
}
......
......@@ -2103,7 +2103,7 @@ static WINMM_MapType MCI_UnMapMsg16To32W(WORD uDevType, WORD wMsg, DWORD dwFlag
mip32w->lpstrReturn, mip32w->dwRetSize / sizeof(WCHAR),
MapSL(mip16->lpstrReturn), mip16->dwRetSize,
NULL, NULL);
HeapFree(GetProcessHeap(), 0, (LPVOID)mip32w->lpstrReturn);
HeapFree(GetProcessHeap(), 0, mip32w->lpstrReturn);
HeapFree(GetProcessHeap(), 0, (LPVOID)lParam);
}
return WINMM_MAP_OK;
......@@ -2116,7 +2116,7 @@ static WINMM_MapType MCI_UnMapMsg16To32W(WORD uDevType, WORD wMsg, DWORD dwFlag
msip32w->lpstrReturn, msip32w->dwRetSize,
MapSL(msip16->lpstrReturn), msip16->dwRetSize,
NULL, NULL);
HeapFree(GetProcessHeap(), 0, (LPVOID)msip32w->lpstrReturn);
HeapFree(GetProcessHeap(), 0, msip32w->lpstrReturn);
HeapFree(GetProcessHeap(), 0, (LPVOID)lParam);
}
return WINMM_MAP_OK;
......@@ -2194,7 +2194,7 @@ static WINMM_MapType MCI_MsgMapper32WTo16_Create(void** ptr, int size16, DWORD m
if (!lp) {
return WINMM_MAP_NOMEM;
}
p32 = (LPBYTE)(*ptr);
p32 = *ptr;
if (keep) {
*(void**)lp = *ptr;
p16 = (LPBYTE)lp + sizeof(void**);
......
......@@ -1883,7 +1883,7 @@ extern DWORD WINAPI GetProcessFlags(DWORD);
*/
static WINE_MMTHREAD* WINMM_GetmmThread(HANDLE16 h)
{
return (WINE_MMTHREAD*)MapSL( MAKESEGPTR(h, 0) );
return MapSL(MAKESEGPTR(h, 0));
}
DWORD WINAPI WINE_mmThreadEntryPoint(LPVOID);
......
......@@ -263,7 +263,7 @@ static WINE_PLAYSOUND* PlaySound_Alloc(const void* pszSound, HMODULE hmod,
static DWORD WINAPI proc_PlaySound(LPVOID arg)
{
WINE_PLAYSOUND* wps = (WINE_PLAYSOUND*)arg;
WINE_PLAYSOUND* wps = arg;
BOOL bRet = FALSE;
HMMIO hmmio = 0;
MMCKINFO ckMainRIFF;
......@@ -302,7 +302,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
memset(&mminfo, 0, sizeof(mminfo));
mminfo.fccIOProc = FOURCC_MEM;
mminfo.pchBuffer = (LPSTR)data;
mminfo.pchBuffer = data;
mminfo.cchBuffer = -1; /* FIXME: when a resource, could grab real size */
TRACE("Memory sound %p\n", data);
hmmio = mmioOpenW(NULL, &mminfo, MMIO_READ);
......
......@@ -569,7 +569,7 @@ static DWORD WINAPI callback_thread(LPVOID lpParameter)
MSG msg;
PeekMessageW( &msg, 0, 0, 0, PM_NOREMOVE ); /* make sure the thread has a message queue */
SetEvent((HANDLE)lpParameter);
SetEvent(lpParameter);
while (GetMessage(&msg, 0, 0, 0)) {
UINT message = msg.message;
......@@ -578,9 +578,9 @@ static DWORD WINAPI callback_thread(LPVOID lpParameter)
message == WOM_CLOSE || message == WM_USER || message == WM_APP,
"GetMessage returned unexpected message: %u\n", message);
if (message == WOM_OPEN || message == WOM_DONE || message == WOM_CLOSE)
SetEvent((HANDLE)lpParameter);
SetEvent(lpParameter);
else if (message == WM_APP) {
SetEvent((HANDLE)lpParameter);
SetEvent(lpParameter);
return 0;
}
}
......
......@@ -164,10 +164,10 @@ static int TIME_MMSysTimeCallback(void)
switch(timer->wFlags & (TIME_CALLBACK_EVENT_SET|TIME_CALLBACK_EVENT_PULSE))
{
case TIME_CALLBACK_EVENT_SET:
SetEvent((HANDLE)timer->lpFunc);
SetEvent(timer->lpFunc);
break;
case TIME_CALLBACK_EVENT_PULSE:
PulseEvent((HANDLE)timer->lpFunc);
PulseEvent(timer->lpFunc);
break;
case TIME_CALLBACK_FUNCTION:
{
......
......@@ -363,7 +363,7 @@ UINT MIXER_Open(LPHMIXER lphMix, UINT uDeviceID, DWORD_PTR dwCallback,
wmld = MMDRV_Alloc(sizeof(WINE_MIXER), MMDRV_MIXER, &hMix, &fdwOpen,
&dwCallback, &dwInstance, bFrom32);
wmld->uDeviceID = uDeviceID;
mod.hmx = (HMIXEROBJ)hMix;
mod.hmx = hMix;
dwRet = MMDRV_Open(wmld, MXDM_OPEN, (DWORD)&mod, CALLBACK_FUNCTION);
......@@ -464,7 +464,7 @@ UINT WINAPI mixerGetControlDetailsA(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdA
break;
case MIXER_GETCONTROLDETAILSF_LISTTEXT:
{
MIXERCONTROLDETAILS_LISTTEXTA *pDetailsA = (MIXERCONTROLDETAILS_LISTTEXTA *)lpmcdA->paDetails;
MIXERCONTROLDETAILS_LISTTEXTA *pDetailsA = lpmcdA->paDetails;
MIXERCONTROLDETAILS_LISTTEXTW *pDetailsW;
int size = max(1, lpmcdA->cChannels) * sizeof(MIXERCONTROLDETAILS_LISTTEXTW);
unsigned int i;
......@@ -926,7 +926,7 @@ static LPWINE_MIDI MIDI_OutAlloc(HMIDIOUT* lphMidiOut, DWORD_PTR* lpdwCallback,
*lphMidiOut = hMidiOut;
if (lpwm) {
lpwm->mod.hMidi = (HMIDI) hMidiOut;
lpwm->mod.hMidi = hMidiOut;
lpwm->mod.dwCallback = *lpdwCallback;
lpwm->mod.dwInstance = *lpdwInstance;
lpwm->mod.dnDevNode = 0;
......@@ -1253,7 +1253,7 @@ UINT MIDI_InOpen(HMIDIIN* lphMidiIn, UINT uDeviceID, DWORD_PTR dwCallback,
if (lpwm == NULL)
return MMSYSERR_NOMEM;
lpwm->mod.hMidi = (HMIDI) hMidiIn;
lpwm->mod.hMidi = hMidiIn;
lpwm->mod.dwCallback = dwCallback;
lpwm->mod.dwInstance = dwInstance;
......
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