quartz: Remove superfluous pointer casts.

Michael Stefaniuc mstefani at redhat.de
Thu Jan 29 04:14:55 CST 2009


---
 dlls/quartz/acmwrapper.c     |    2 +-
 dlls/quartz/avidec.c         |    2 +-
 dlls/quartz/avisplit.c       |   12 ++++++------
 dlls/quartz/dsoundrender.c   |   16 ++++++++--------
 dlls/quartz/enumfilters.c    |    4 ++--
 dlls/quartz/enummedia.c      |    4 ++--
 dlls/quartz/enummoniker.c    |    2 +-
 dlls/quartz/enumpins.c       |    4 ++--
 dlls/quartz/enumregfilters.c |    4 ++--
 dlls/quartz/filesource.c     |   24 ++++++++++++------------
 dlls/quartz/filtergraph.c    |    2 +-
 dlls/quartz/filtermapper.c   |    6 +++---
 dlls/quartz/memallocator.c   |   12 ++++++------
 dlls/quartz/mpegsplit.c      |    8 ++++----
 dlls/quartz/nullrenderer.c   |   12 ++++++------
 dlls/quartz/parser.c         |   18 +++++++++---------
 dlls/quartz/pin.c            |   14 +++++++-------
 dlls/quartz/systemclock.c    |    2 +-
 dlls/quartz/transform.c      |   10 +++++-----
 dlls/quartz/videorenderer.c  |   22 +++++++++++-----------
 dlls/quartz/waveparser.c     |    8 ++++----
 21 files changed, 94 insertions(+), 94 deletions(-)

diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c
index 3c6c28e..c275d83 100644
--- a/dlls/quartz/acmwrapper.c
+++ b/dlls/quartz/acmwrapper.c
@@ -331,7 +331,7 @@ HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv)
     if (FAILED(hr))
         return hr;
 
-    *ppv = (LPVOID)This;
+    *ppv = This;
     This->lasttime_real = This->lasttime_sent = -1;
 
     return hr;
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c
index ae95cf5..68b1908 100644
--- a/dlls/quartz/avidec.c
+++ b/dlls/quartz/avidec.c
@@ -336,7 +336,7 @@ HRESULT AVIDec_create(IUnknown * pUnkOuter, LPVOID * ppv)
     if (FAILED(hr))
         return hr;
 
-    *ppv = (LPVOID)This;
+    *ppv = This;
 
     return hr;
 }
diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c
index 1c9631d..faa844b 100644
--- a/dlls/quartz/avisplit.c
+++ b/dlls/quartz/avisplit.c
@@ -403,7 +403,7 @@ static HRESULT AVISplitter_done_process(LPVOID iface);
  */
 static HRESULT AVISplitter_first_request(LPVOID iface)
 {
-    AVISplitterImpl *This = (AVISplitterImpl *)iface;
+    AVISplitterImpl *This = iface;
     HRESULT hr = S_OK;
     DWORD x;
     IMediaSample *sample = NULL;
@@ -740,7 +740,7 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE
                 pvi = (VIDEOINFOHEADER *)amt.pbFormat;
                 pvi->AvgTimePerFrame = (LONGLONG)(10000000.0 / fSamplesPerSec);
 
-                CopyMemory(&pvi->bmiHeader, (const BYTE *)(pChunk + 1), pChunk->cb);
+                CopyMemory(&pvi->bmiHeader, pChunk + 1, pChunk->cb);
                 if (pvi->bmiHeader.biCompression)
                     amt.subtype.Data1 = pvi->bmiHeader.biCompression;
             }
@@ -751,13 +751,13 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE
                     amt.cbFormat = sizeof(WAVEFORMATEX);
                 amt.pbFormat = CoTaskMemAlloc(amt.cbFormat);
                 ZeroMemory(amt.pbFormat, amt.cbFormat);
-                CopyMemory(amt.pbFormat, (const BYTE *)(pChunk + 1), pChunk->cb);
+                CopyMemory(amt.pbFormat, pChunk + 1, pChunk->cb);
             }
             else
             {
                 amt.cbFormat = pChunk->cb;
                 amt.pbFormat = CoTaskMemAlloc(amt.cbFormat);
-                CopyMemory(amt.pbFormat, (const BYTE *)(pChunk + 1), amt.cbFormat);
+                CopyMemory(amt.pbFormat, pChunk + 1, amt.cbFormat);
             }
             break;
         case ckidSTREAMNAME:
@@ -1193,7 +1193,7 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
 
 static HRESULT AVISplitter_Flush(LPVOID iface)
 {
-    AVISplitterImpl *This = (AVISplitterImpl*)iface;
+    AVISplitterImpl *This = iface;
     DWORD x;
 
     TRACE("(%p)->()\n", This);
@@ -1433,7 +1433,7 @@ HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
     if (FAILED(hr))
         return hr;
 
-    *ppv = (LPVOID)This;
+    *ppv = This;
 
     return hr;
 }
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c
index a92e866..00c2af8 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -233,7 +233,7 @@ static HRESULT DSoundRender_SendSampleData(DSoundRenderImpl* This, const BYTE *d
 
 static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample)
 {
-    DSoundRenderImpl *This = (DSoundRenderImpl *)iface;
+    DSoundRenderImpl *This = iface;
     LPBYTE pbSrcStream = NULL;
     long cbSrcStream = 0;
     REFERENCE_TIME tStart, tStop;
@@ -438,7 +438,7 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv)
             return HRESULT_FROM_WIN32(GetLastError());
         }
 
-        *ppv = (LPVOID)pDSoundRender;
+        *ppv = pDSoundRender;
     }
     else
     {
@@ -460,17 +460,17 @@ static HRESULT WINAPI DSoundRender_QueryInterface(IBaseFilter * iface, REFIID ri
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IPersist))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IBaseFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IBasicAudio))
-        *ppv = (LPVOID)&(This->IBasicAudio_vtbl);
+        *ppv = &This->IBasicAudio_vtbl;
     else if (IsEqualIID(riid, &IID_IReferenceClock))
-        *ppv = (LPVOID)&(This->IReferenceClock_vtbl);
+        *ppv = &This->IReferenceClock_vtbl;
     else if (IsEqualIID(riid, &IID_IMediaSeeking))
         *ppv = &This->mediaSeeking.lpVtbl;
 
diff --git a/dlls/quartz/enumfilters.c b/dlls/quartz/enumfilters.c
index 663451f..ca6a989 100644
--- a/dlls/quartz/enumfilters.c
+++ b/dlls/quartz/enumfilters.c
@@ -74,9 +74,9 @@ static HRESULT WINAPI IEnumFiltersImpl_QueryInterface(IEnumFilters * iface, REFI
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IEnumFilters))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
 
     if (*ppv)
     {
diff --git a/dlls/quartz/enummedia.c b/dlls/quartz/enummedia.c
index f18cb90..60ff13a 100644
--- a/dlls/quartz/enummedia.c
+++ b/dlls/quartz/enummedia.c
@@ -134,9 +134,9 @@ static HRESULT WINAPI IEnumMediaTypesImpl_QueryInterface(IEnumMediaTypes * iface
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IEnumMediaTypes))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
 
     if (*ppv)
     {
diff --git a/dlls/quartz/enummoniker.c b/dlls/quartz/enummoniker.c
index 42ea361..0cc804a 100644
--- a/dlls/quartz/enummoniker.c
+++ b/dlls/quartz/enummoniker.c
@@ -84,7 +84,7 @@ static HRESULT WINAPI EnumMonikerImpl_QueryInterface(
     if (IsEqualGUID(riid, &IID_IUnknown) ||
         IsEqualGUID(riid, &IID_IEnumMoniker))
     {
-        *ppvObj = (LPVOID)iface;
+        *ppvObj = iface;
         EnumMonikerImpl_AddRef(iface);
         return S_OK;
     }
diff --git a/dlls/quartz/enumpins.c b/dlls/quartz/enumpins.c
index 82dac9d..8125ff4 100644
--- a/dlls/quartz/enumpins.c
+++ b/dlls/quartz/enumpins.c
@@ -70,9 +70,9 @@ static HRESULT WINAPI IEnumPinsImpl_QueryInterface(IEnumPins * iface, REFIID rii
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IEnumPins))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
 
     if (*ppv)
     {
diff --git a/dlls/quartz/enumregfilters.c b/dlls/quartz/enumregfilters.c
index 93e4d61..cadeba5 100644
--- a/dlls/quartz/enumregfilters.c
+++ b/dlls/quartz/enumregfilters.c
@@ -97,9 +97,9 @@ static HRESULT WINAPI IEnumRegFiltersImpl_QueryInterface(IEnumRegFilters * iface
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IEnumRegFilters))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
 
     if (*ppv)
     {
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index c862362..8bb9cfd 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -361,7 +361,7 @@ HRESULT AsyncReader_create(IUnknown * pUnkOuter, LPVOID * ppv)
     pAsyncRead->pszFileName = NULL;
     pAsyncRead->pmt = NULL;
 
-    *ppv = (LPVOID)pAsyncRead;
+    *ppv = pAsyncRead;
 
     TRACE("-- created at %p\n", pAsyncRead);
 
@@ -379,15 +379,15 @@ static HRESULT WINAPI AsyncReader_QueryInterface(IBaseFilter * iface, REFIID rii
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IPersist))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IBaseFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IFileSourceFilter))
-        *ppv = (LPVOID)(&This->lpVtblFSF);
+        *ppv = &This->lpVtblFSF;
 
     if (*ppv)
     {
@@ -531,7 +531,7 @@ static HRESULT AsyncReader_GetPin(IBaseFilter *iface, ULONG pos, IPin **pin, DWO
     if (pos >= 1 || !This->pOutputPin)
         return S_FALSE;
 
-    *pin = (IPin *)This->pOutputPin;
+    *pin = This->pOutputPin;
     IPin_AddRef(*pin);
     return S_OK;
 }
@@ -781,8 +781,8 @@ static inline FileAsyncReader *impl_from_IAsyncReader( IAsyncReader *iface )
 
 static HRESULT AcceptProcAFR(LPVOID iface, const AM_MEDIA_TYPE *pmt)
 {
-    AsyncReader *This = (AsyncReader *)iface;
-    
+    AsyncReader *This = iface;
+
     FIXME("(%p, %p)\n", iface, pmt);
 
     if (IsEqualGUID(&pmt->majortype, &This->pmt->majortype) &&
@@ -803,11 +803,11 @@ static HRESULT WINAPI FileAsyncReaderPin_QueryInterface(IPin * iface, REFIID rii
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IPin))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IAsyncReader))
-        *ppv = (LPVOID)&This->lpVtblAR;
+        *ppv = &This->lpVtblAR;
 
     if (*ppv)
     {
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 967a578..d58dc00 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -2717,7 +2717,7 @@ static HRESULT GetTargetInterface(IFilterGraphImpl* pGraph, REFIID riid, LPVOID*
         {
             pGraph->ItfCacheEntries[entry].riid = riid;
             pGraph->ItfCacheEntries[entry].filter = pGraph->ppFiltersInGraph[i];
-            pGraph->ItfCacheEntries[entry].iface = (IUnknown*)*ppvObj;
+            pGraph->ItfCacheEntries[entry].iface = *ppvObj;
             if (entry >= pGraph->nItfCacheEntries)
                 pGraph->nItfCacheEntries++;
             return S_OK;
diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c
index b4c0900..7b8d954 100644
--- a/dlls/quartz/filtermapper.c
+++ b/dlls/quartz/filtermapper.c
@@ -970,8 +970,8 @@ static BOOL MatchTypes(
 /* internal helper function for qsort of MONIKER_MERIT array */
 static int mm_compare(const void * left, const void * right)
 {
-    const struct MONIKER_MERIT * mmLeft = (const struct MONIKER_MERIT *)left;
-    const struct MONIKER_MERIT * mmRight = (const struct MONIKER_MERIT *)right;
+    const struct MONIKER_MERIT * mmLeft = left;
+    const struct MONIKER_MERIT * mmRight = right;
 
     if (mmLeft->dwMerit == mmRight->dwMerit)
         return 0;
@@ -1346,7 +1346,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
 
         if (SUCCEEDED(hrSub))
         {
-            len = (strlenW((WCHAR*)V_UNION(&var, bstrVal))+1) * sizeof(WCHAR);
+            len = (strlenW(V_UNION(&var, bstrVal))+1) * sizeof(WCHAR);
             if (!(regfilters[idx].Name = CoTaskMemAlloc(len*2)))
                 hr = E_OUTOFMEMORY;
         }
diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c
index 58c9b6c..f4a2f16 100644
--- a/dlls/quartz/memallocator.c
+++ b/dlls/quartz/memallocator.c
@@ -99,9 +99,9 @@ static HRESULT WINAPI BaseMemAllocator_QueryInterface(IMemAllocator * iface, REF
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMemAllocator))
-        *ppv = (LPVOID)This;
+        *ppv = This;
 
     if (*ppv)
     {
@@ -439,11 +439,11 @@ static HRESULT WINAPI StdMediaSample2_QueryInterface(IMediaSample2 * iface, REFI
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaSample))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaSample2))
-        *ppv = (LPVOID)This;
+        *ppv = This;
 
     if (*ppv)
     {
@@ -877,7 +877,7 @@ HRESULT StdMemAllocator_create(LPUNKNOWN lpUnkOuter, LPVOID * ppv)
     pMemAlloc->pMemory = NULL;
 
     if (SUCCEEDED(hr = BaseMemAllocator_Init(StdMemAllocator_Alloc, StdMemAllocator_Free, NULL, NULL, NULL, StdMemAllocator_Destroy, &pMemAlloc->csState, &pMemAlloc->base)))
-        *ppv = (LPVOID)pMemAlloc;
+        *ppv = pMemAlloc;
     else
         CoTaskMemFree(pMemAlloc);
 
diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c
index b5b01ff..373e537 100644
--- a/dlls/quartz/mpegsplit.c
+++ b/dlls/quartz/mpegsplit.c
@@ -243,7 +243,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample)
 
 static HRESULT MPEGSplitter_process_sample(LPVOID iface, IMediaSample * pSample, DWORD_PTR cookie)
 {
-    MPEGSplitterImpl *This = (MPEGSplitterImpl*)iface;
+    MPEGSplitterImpl *This = iface;
     BYTE *pbSrcStream;
     DWORD cbSrcStream = 0;
     REFERENCE_TIME tStart, tStop, tAviStart = This->position;
@@ -615,7 +615,7 @@ static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin, ALLOCATO
 
 static HRESULT MPEGSplitter_cleanup(LPVOID iface)
 {
-    MPEGSplitterImpl *This = (MPEGSplitterImpl*)iface;
+    MPEGSplitterImpl *This = iface;
 
     TRACE("(%p)\n", This);
 
@@ -709,7 +709,7 @@ static HRESULT MPEGSplitter_disconnect(LPVOID iface)
 
 static HRESULT MPEGSplitter_first_request(LPVOID iface)
 {
-    MPEGSplitterImpl *This = (MPEGSplitterImpl*)iface;
+    MPEGSplitterImpl *This = iface;
     PullPin *pin = This->Parser.pInputPin;
     HRESULT hr;
     LONGLONG length;
@@ -808,7 +808,7 @@ HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
     This->seek = 1;
 
     /* Note: This memory is managed by the parser filter once created */
-    *ppv = (LPVOID)This;
+    *ppv = This;
 
     return hr;
 }
diff --git a/dlls/quartz/nullrenderer.c b/dlls/quartz/nullrenderer.c
index b64e1d1..f774012 100644
--- a/dlls/quartz/nullrenderer.c
+++ b/dlls/quartz/nullrenderer.c
@@ -69,7 +69,7 @@ typedef struct NullRendererImpl
 
 static HRESULT NullRenderer_Sample(LPVOID iface, IMediaSample * pSample)
 {
-    NullRendererImpl *This = (NullRendererImpl *)iface;
+    NullRendererImpl *This = iface;
     HRESULT hr = S_OK;
 
     TRACE("%p %p\n", iface, pSample);
@@ -180,7 +180,7 @@ HRESULT NullRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
         MediaSeekingImpl_Init((IBaseFilter*)pNullRenderer, NullRendererImpl_Change, NullRendererImpl_Change, NullRendererImpl_Change, &pNullRenderer->mediaSeeking, &pNullRenderer->csFilter);
         pNullRenderer->mediaSeeking.lpVtbl = &TransformFilter_Seeking_Vtbl;
 
-        *ppv = (LPVOID)pNullRenderer;
+        *ppv = pNullRenderer;
     }
     else
     {
@@ -203,13 +203,13 @@ static HRESULT WINAPI NullRendererInner_QueryInterface(IUnknown * iface, REFIID
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)&(This->IInner_vtbl);
+        *ppv = &This->IInner_vtbl;
     else if (IsEqualIID(riid, &IID_IPersist))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IBaseFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaSeeking))
         *ppv = &This->mediaSeeking;
 
diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c
index 147ae88..da5e9d3 100644
--- a/dlls/quartz/parser.c
+++ b/dlls/quartz/parser.c
@@ -115,15 +115,15 @@ HRESULT WINAPI Parser_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID *
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IPersist))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IBaseFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaSeeking))
-        *ppv = (LPVOID)&This->mediaSeeking;
+        *ppv = &This->mediaSeeking;
 
     if (*ppv)
     {
@@ -496,7 +496,7 @@ HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PR
         CopyMediaType(pin->pmt, amt);
         pin->dwSamplesProcessed = 0;
 
-        pin->pin.pin.pUserData = (LPVOID)This->ppPins[This->cStreams + 1];
+        pin->pin.pin.pUserData = This->ppPins[This->cStreams + 1];
         pin->pin.pin.pinInfo.pFilter = (LPVOID)This;
         pin->pin.custom_allocator = 1;
         This->cStreams++;
@@ -613,9 +613,9 @@ static HRESULT WINAPI Parser_OutputPin_QueryInterface(IPin * iface, REFIID riid,
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IPin))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IMediaSeeking))
     {
         return IBaseFilter_QueryInterface(This->pin.pin.pinInfo.pFilter, &IID_IMediaSeeking, ppv);
@@ -679,7 +679,7 @@ static HRESULT WINAPI Parser_OutputPin_Connect(IPin * iface, IPin * pReceivePin,
 
 static HRESULT Parser_OutputPin_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt)
 {
-    Parser_OutputPin *This = (Parser_OutputPin *)iface;
+    Parser_OutputPin *This = iface;
 
     TRACE("()\n");
     dump_AM_MEDIA_TYPE(pmt);
diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c
index bdfccd7..b8f3652 100644
--- a/dlls/quartz/pin.c
+++ b/dlls/quartz/pin.c
@@ -323,11 +323,11 @@ HRESULT WINAPI InputPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv)
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IPin))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IMemInputPin))
-        *ppv = (LPVOID)&This->lpVtblMemInput;
+        *ppv = &This->lpVtblMemInput;
     else if (IsEqualIID(riid, &IID_IMediaSeeking))
     {
         return IBaseFilter_QueryInterface(This->pin.pinInfo.pFilter, &IID_IMediaSeeking, ppv);
@@ -670,9 +670,9 @@ HRESULT WINAPI OutputPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv)
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IPin))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IMediaSeeking))
     {
         return IBaseFilter_QueryInterface(This->pin.pinInfo.pFilter, &IID_IMediaSeeking, ppv);
@@ -1203,9 +1203,9 @@ HRESULT WINAPI PullPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv)
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IPin))
-        *ppv = (LPVOID)iface;
+        *ppv = iface;
     else if (IsEqualIID(riid, &IID_IMediaSeeking))
     {
         return IBaseFilter_QueryInterface(This->pin.pinInfo.pFilter, &IID_IMediaSeeking, ppv);
diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c
index a971993..6241352 100644
--- a/dlls/quartz/systemclock.c
+++ b/dlls/quartz/systemclock.c
@@ -89,7 +89,7 @@ static void QUARTZ_InsertAviseEntryFromQueue(SystemClockImpl* This, SystemClockA
 #define ADVISE_ADD_PERIODIC    (WM_APP + 8)
 
 static DWORD WINAPI SystemClockAdviseThread(LPVOID lpParam) {
-  SystemClockImpl* This = (SystemClockImpl*) lpParam;
+  SystemClockImpl* This = lpParam;
   DWORD timeOut = INFINITE;
   DWORD tmpTimeOut;
   MSG msg;
diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c
index 77ca4d7..adb753d 100644
--- a/dlls/quartz/transform.c
+++ b/dlls/quartz/transform.c
@@ -63,7 +63,7 @@ static HRESULT TransformFilter_Input_QueryAccept(LPVOID iface, const AM_MEDIA_TY
 
 static HRESULT TransformFilter_Output_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt)
 {
-    TransformFilterImpl* pTransformFilter = (TransformFilterImpl*)iface;
+    TransformFilterImpl* pTransformFilter = iface;
     AM_MEDIA_TYPE* outpmt = &pTransformFilter->pmt;
     TRACE("%p\n", iface);
 
@@ -225,13 +225,13 @@ static HRESULT WINAPI TransformFilter_QueryInterface(IBaseFilter * iface, REFIID
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IPersist))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IBaseFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaSeeking))
         *ppv = &This->mediaSeeking;
 
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index 9a2e1c3..98b66f5 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -204,7 +204,7 @@ static BOOL CreateRenderingWindow(VideoRendererImpl* This)
 
 static DWORD WINAPI MessageLoop(LPVOID lpParameter)
 {
-    VideoRendererImpl* This = (VideoRendererImpl*) lpParameter;
+    VideoRendererImpl* This = lpParameter;
     MSG msg; 
     BOOL fGotMessage;
 
@@ -237,7 +237,7 @@ static BOOL CreateRenderingSubsystem(VideoRendererImpl* This)
     if (!This->hEvent)
         return FALSE;
 
-    This->hThread = CreateThread(NULL, 0, MessageLoop, (LPVOID)This, 0, &This->ThreadID);
+    This->hThread = CreateThread(NULL, 0, MessageLoop, This, 0, &This->ThreadID);
     if (!This->hThread)
     {
         CloseHandle(This->hEvent);
@@ -337,7 +337,7 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
 
 static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample)
 {
-    VideoRendererImpl *This = (VideoRendererImpl *)iface;
+    VideoRendererImpl *This = iface;
     LPBYTE pbSrcStream = NULL;
     long cbSrcStream = 0;
     REFERENCE_TIME tStart, tStop;
@@ -477,7 +477,7 @@ static HRESULT VideoRenderer_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt
         IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB565) ||
         IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB8))
     {
-        VideoRendererImpl* This = (VideoRendererImpl*) iface;
+        VideoRendererImpl* This = iface;
 
         if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo))
         {
@@ -609,7 +609,7 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
         pVideoRenderer->mediaSeeking.lpVtbl = &VideoRendererImpl_Seeking_Vtbl;
 
         pVideoRenderer->sample_held = NULL;
-        *ppv = (LPVOID)pVideoRenderer;
+        *ppv = pVideoRenderer;
     }
     else
     {
@@ -648,17 +648,17 @@ static HRESULT WINAPI VideoRendererInner_QueryInterface(IUnknown * iface, REFIID
     *ppv = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown))
-        *ppv = (LPVOID)&(This->IInner_vtbl);
+        *ppv = &This->IInner_vtbl;
     else if (IsEqualIID(riid, &IID_IPersist))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IMediaFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IBaseFilter))
-        *ppv = (LPVOID)This;
+        *ppv = This;
     else if (IsEqualIID(riid, &IID_IBasicVideo))
-        *ppv = (LPVOID)&(This->IBasicVideo_vtbl);
+        *ppv = &This->IBasicVideo_vtbl;
     else if (IsEqualIID(riid, &IID_IVideoWindow))
-        *ppv = (LPVOID)&(This->IVideoWindow_vtbl);
+        *ppv = &This->IVideoWindow_vtbl;
     else if (IsEqualIID(riid, &IID_IMediaSeeking))
         *ppv = &This->mediaSeeking;
 
diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c
index 774db98..cbdfceb 100644
--- a/dlls/quartz/waveparser.c
+++ b/dlls/quartz/waveparser.c
@@ -73,7 +73,7 @@ static LONGLONG duration_to_bytepos(WAVEParserImpl *This, LONGLONG duration)
 
 static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample, DWORD_PTR cookie)
 {
-    WAVEParserImpl *This = (WAVEParserImpl *)iface;
+    WAVEParserImpl *This = iface;
     LPBYTE pbSrcStream = NULL;
     ULONG cbSrcStream = 0;
     REFERENCE_TIME tStart, tStop;
@@ -333,7 +333,7 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
 
 static HRESULT WAVEParser_Cleanup(LPVOID iface)
 {
-    WAVEParserImpl *This = (WAVEParserImpl*)iface;
+    WAVEParserImpl *This = iface;
 
     TRACE("(%p)->()\n", This);
 
@@ -342,7 +342,7 @@ static HRESULT WAVEParser_Cleanup(LPVOID iface)
 
 static HRESULT WAVEParser_first_request(LPVOID iface)
 {
-    WAVEParserImpl *This = (WAVEParserImpl *)iface;
+    WAVEParserImpl *This = iface;
     PullPin *pin = This->Parser.pInputPin;
     HRESULT hr;
     IMediaSample *sample;
@@ -431,7 +431,7 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)
     if (FAILED(hr))
         return hr;
 
-    *ppv = (LPVOID)This;
+    *ppv = This;
 
     return hr;
 }
-- 
1.6.0.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090129/12c4c505/attachment-0001.pgp 


More information about the wine-patches mailing list