Module: wine Branch: master Commit: c0a9281c1e83a65b332f099b465680a1b90c2532 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c0a9281c1e83a65b332f099b46...
Author: Michael Stefaniuc mstefani@redhat.de Date: Thu Jan 22 09:52:59 2009 +0100
wineoss.drv: Remove superfluous pointer casts.
---
dlls/wineoss.drv/dscapture.c | 14 +++++++------- dlls/wineoss.drv/dsrender.c | 10 +++++----- dlls/wineoss.drv/midi.c | 8 ++++---- dlls/wineoss.drv/mixer.c | 14 +++++++------- 4 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/dlls/wineoss.drv/dscapture.c b/dlls/wineoss.drv/dscapture.c index 8849644..491d873 100644 --- a/dlls/wineoss.drv/dscapture.c +++ b/dlls/wineoss.drv/dscapture.c @@ -161,7 +161,7 @@ static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_QueryInterface( if ( IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDsDriverPropertySet) ) { IDsDriverPropertySet_AddRef(iface); - *ppobj = (LPVOID)This; + *ppobj = This; return DS_OK; }
@@ -395,7 +395,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface( if ( IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDsCaptureDriverBuffer) ) { IDsCaptureDriverBuffer_AddRef(iface); - *ppobj = (LPVOID)This; + *ppobj = This; return DS_OK; }
@@ -404,7 +404,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface( IDsCaptureDriverNotifyImpl_Create(This, &(This->notify)); if (This->notify) { IDsDriverNotify_AddRef((PIDSDRIVERNOTIFY)This->notify); - *ppobj = (LPVOID)This->notify; + *ppobj = This->notify; return DS_OK; } return E_FAIL; @@ -415,7 +415,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface( IDsCaptureDriverPropertySetImpl_Create(This, &(This->property_set)); if (This->property_set) { IDsDriverPropertySet_AddRef((PIDSDRIVERPROPERTYSET)This->property_set); - *ppobj = (LPVOID)This->property_set; + *ppobj = This->property_set; return DS_OK; } return E_FAIL; @@ -721,7 +721,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_QueryInterface( if ( IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDsCaptureDriver) ) { IDsCaptureDriver_AddRef(iface); - *ppobj = (LPVOID)This; + *ppobj = This; return DS_OK; }
@@ -859,7 +859,7 @@ static void * my_memcpy(void * dst, const void * src, int length)
static DWORD CALLBACK DSCDB_Thread(LPVOID lpParameter) { - IDsCaptureDriverBufferImpl *This = (IDsCaptureDriverBufferImpl *)lpParameter; + IDsCaptureDriverBufferImpl *This = lpParameter; struct pollfd poll_list[2]; int retval; DWORD offset = 0; @@ -1212,7 +1212,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer( (*ippdscdb)->hStartUpEvent = CreateEventW(NULL, FALSE, FALSE, NULL); (*ippdscdb)->hExitEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
- (*ippdscdb)->hThread = CreateThread(NULL, 0, DSCDB_Thread, (LPVOID)(*ippdscdb), 0, &((*ippdscdb)->dwThreadID)); + (*ippdscdb)->hThread = CreateThread(NULL, 0, DSCDB_Thread, *ippdscdb, 0, &((*ippdscdb)->dwThreadID)); WaitForSingleObject((*ippdscdb)->hStartUpEvent, INFINITE); CloseHandle((*ippdscdb)->hStartUpEvent); (*ippdscdb)->hStartUpEvent = INVALID_HANDLE_VALUE; diff --git a/dlls/wineoss.drv/dsrender.c b/dlls/wineoss.drv/dsrender.c index de704d0..02849c7 100644 --- a/dlls/wineoss.drv/dsrender.c +++ b/dlls/wineoss.drv/dsrender.c @@ -155,7 +155,7 @@ static HRESULT WINAPI IDsDriverPropertySetImpl_QueryInterface( if ( IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDsDriverPropertySet) ) { IDsDriverPropertySet_AddRef(iface); - *ppobj = (LPVOID)This; + *ppobj = This; return DS_OK; }
@@ -403,7 +403,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface, if ( IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDsDriverBuffer) ) { IDsDriverBuffer_AddRef(iface); - *ppobj = (LPVOID)This; + *ppobj = This; return DS_OK; }
@@ -412,7 +412,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface, IDsDriverNotifyImpl_Create(This, &(This->notify)); if (This->notify) { IDsDriverNotify_AddRef((PIDSDRIVERNOTIFY)This->notify); - *ppobj = (LPVOID)This->notify; + *ppobj = This->notify; return DS_OK; } *ppobj = 0; @@ -424,7 +424,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface, IDsDriverPropertySetImpl_Create(This, &(This->property_set)); if (This->property_set) { IDsDriverPropertySet_AddRef((PIDSDRIVERPROPERTYSET)This->property_set); - *ppobj = (LPVOID)This->property_set; + *ppobj = This->property_set; return DS_OK; } *ppobj = 0; @@ -668,7 +668,7 @@ static HRESULT WINAPI IDsDriverImpl_QueryInterface(PIDSDRIVER iface, REFIID riid if ( IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDsDriver) ) { IDsDriver_AddRef(iface); - *ppobj = (LPVOID)This; + *ppobj = This; return DS_OK; }
diff --git a/dlls/wineoss.drv/midi.c b/dlls/wineoss.drv/midi.c index 5f24f2f..bd6e74b 100644 --- a/dlls/wineoss.drv/midi.c +++ b/dlls/wineoss.drv/midi.c @@ -1025,7 +1025,7 @@ static int modFMLoad(int dev) sbi.channel = i; memcpy(sbi.operators, midiFMInstrumentPatches + i * 16, 16);
- if (write(midiSeqFD, (char*)&sbi, sizeof(sbi)) == -1) { + if (write(midiSeqFD, &sbi, sizeof(sbi)) == -1) { WARN("Couldn't write patch for instrument %d, errno %d (%s)!\n", sbi.channel, errno, strerror(errno)); return -1; } @@ -1034,7 +1034,7 @@ static int modFMLoad(int dev) sbi.channel = 128 + i; memcpy(sbi.operators, midiFMDrumsPatches + i * 16, 16);
- if (write(midiSeqFD, (char*)&sbi, sizeof(sbi)) == -1) { + if (write(midiSeqFD, &sbi, sizeof(sbi)) == -1) { WARN("Couldn't write patch for drum %d, errno %d (%s)!\n", sbi.channel, errno, strerror(errno)); return -1; } @@ -1047,7 +1047,7 @@ static int modFMLoad(int dev) */ static void modFMReset(WORD wDevID) { - sFMextra* extra = (sFMextra*)MidiOutDev[wDevID].lpExtra; + sFMextra* extra = MidiOutDev[wDevID].lpExtra; sVoice* voice = extra->voice; sChannel* channel = extra->channel; int i; @@ -1252,7 +1252,7 @@ static DWORD modData(WORD wDevID, DWORD dwParam) * - chorus depth controller is not used */ { - sFMextra* extra = (sFMextra*)MidiOutDev[wDevID].lpExtra; + sFMextra* extra = MidiOutDev[wDevID].lpExtra; sVoice* voice = extra->voice; sChannel* channel = extra->channel; int chn = (evt & 0x0F); diff --git a/dlls/wineoss.drv/mixer.c b/dlls/wineoss.drv/mixer.c index 58433e6..ac06f1a 100644 --- a/dlls/wineoss.drv/mixer.c +++ b/dlls/wineoss.drv/mixer.c @@ -1107,7 +1107,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, getControlType(mix->ctrl[c].ctrl.dwControlType), lpmcd->cChannels);
- mcdu = (LPMIXERCONTROLDETAILS_UNSIGNED)lpmcd->paDetails; + mcdu = lpmcd->paDetails;
/* return value is 00RL (4 bytes)... */ if ((val = mix->volume[chnl]) == -1 && @@ -1155,7 +1155,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, lpmcd->cChannels);
/* we mute both channels at the same time */ - mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails; + mcdb = lpmcd->paDetails; mcdb->fValue = (mix->volume[chnl] != -1); TRACE("=> %s\n", mcdb->fValue ? "on" : "off"); } @@ -1188,7 +1188,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, int i, j;
/* we mute both channels at the same time */ - mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails; + mcdb = lpmcd->paDetails;
for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++) { @@ -1229,7 +1229,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, LPMIXERCONTROLDETAILS_LISTTEXTW mcdlt; int i, j;
- mcdlt = (LPMIXERCONTROLDETAILS_LISTTEXTW)lpmcd->paDetails; + mcdlt = lpmcd->paDetails; for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++) { if (WINE_CHN_SUPPORTS(mix->recMask, j)) @@ -1308,7 +1308,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, getControlType(mix->ctrl[c].ctrl.dwControlType), lpmcd->cChannels);
- mcdu = (LPMIXERCONTROLDETAILS_UNSIGNED)lpmcd->paDetails; + mcdu = lpmcd->paDetails; /* val should contain 00RL */ switch (lpmcd->cChannels) { @@ -1360,7 +1360,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, getControlType(mix->ctrl[c].ctrl.dwControlType), lpmcd->cChannels);
- mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails; + mcdb = lpmcd->paDetails; if (mcdb->fValue) { /* save the volume and then set it to 0 */ @@ -1405,7 +1405,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, lpmcd->cChannels);
/* we mute both channels at the same time */ - mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails; + mcdb = lpmcd->paDetails; mask = 0; for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++) {