quartz: Avoid using the long type.

Michael Stefaniuc mstefani at redhat.de
Wed May 19 18:14:09 CDT 2010


---
 dlls/quartz/acmwrapper.c           |    2 +-
 dlls/quartz/avidec.c               |    2 +-
 dlls/quartz/avisplit.c             |    2 +-
 dlls/quartz/dsoundrender.c         |   12 ++++++------
 dlls/quartz/filtergraph.c          |   16 ++++++++--------
 dlls/quartz/memallocator.c         |    2 +-
 dlls/quartz/pin.c                  |    2 +-
 dlls/quartz/pin.h                  |    2 +-
 dlls/quartz/tests/referenceclock.c |    2 +-
 dlls/quartz/videorenderer.c        |    4 ++--
 10 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c
index c275d83..a032391 100644
--- a/dlls/quartz/acmwrapper.c
+++ b/dlls/quartz/acmwrapper.c
@@ -105,7 +105,7 @@ static HRESULT ACMWrapper_ProcessSampleData(InputPin *pin, IMediaSample *pSample
 
     tMed = tStart;
 
-    TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, (long)cbSrcStream);
+    TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream);
 
     hr = IPin_ConnectionMediaType(This->tf.ppPins[0], &amt);
     if (FAILED(hr))
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c
index 8469bbc..b7d45e9 100644
--- a/dlls/quartz/avidec.c
+++ b/dlls/quartz/avidec.c
@@ -101,7 +101,7 @@ static HRESULT AVIDec_ProcessSampleData(InputPin *pin, IMediaSample *pSample)
 
     cbSrcStream = IMediaSample_GetActualDataLength(pSample);
 
-    TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, (long)cbSrcStream);
+    TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream);
 
     hr = IPin_ConnectionMediaType(This->tf.ppPins[0], &amt);
     if (FAILED(hr)) {
diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c
index 3d567d2..6107880 100644
--- a/dlls/quartz/avisplit.c
+++ b/dlls/quartz/avisplit.c
@@ -770,7 +770,7 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE
         {
             const AVISUPERINDEX *pIndex = (const AVISUPERINDEX *)pChunk;
             DWORD x;
-            long rest = pIndex->cb - sizeof(AVISUPERINDEX) + sizeof(RIFFCHUNK) + sizeof(pIndex->aIndex[0]) * ANYSIZE_ARRAY;
+            UINT rest = pIndex->cb - sizeof(AVISUPERINDEX) + sizeof(RIFFCHUNK) + sizeof(pIndex->aIndex[0]) * ANYSIZE_ARRAY;
 
             if (pIndex->cb < sizeof(AVISUPERINDEX) - sizeof(RIFFCHUNK))
             {
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c
index 115577c..b327c00 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -78,8 +78,8 @@ typedef struct DSoundRenderImpl
 
     HANDLE state_change, blocked;
 
-    long volume;
-    long pan;
+    LONG volume;
+    LONG pan;
 } DSoundRenderImpl;
 
 /* Seeking is not needed for a renderer, rely on newsegment for the appropriate changes */
@@ -238,7 +238,7 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample)
 {
     DSoundRenderImpl *This = iface;
     LPBYTE pbSrcStream = NULL;
-    long cbSrcStream = 0;
+    LONG cbSrcStream = 0;
     REFERENCE_TIME tStart, tStop;
     HRESULT hr;
     AM_MEDIA_TYPE *amt;
@@ -344,7 +344,7 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample)
     }
 
     cbSrcStream = IMediaSample_GetActualDataLength(pSample);
-    TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, cbSrcStream);
+    TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream);
 
 #if 0 /* For debugging purpose */
     {
@@ -877,11 +877,11 @@ static HRESULT WINAPI DSoundRender_InputPin_ReceiveConnection(IPin * iface, IPin
         {
             hr = IDirectSoundBuffer_SetVolume(DSImpl->dsbuffer, DSImpl->volume);
             if (FAILED(hr))
-                ERR("Can't set volume to %ld (%x)\n", DSImpl->volume, hr);
+                ERR("Can't set volume to %d (%x)\n", DSImpl->volume, hr);
 
             hr = IDirectSoundBuffer_SetPan(DSImpl->dsbuffer, DSImpl->pan);
             if (FAILED(hr))
-                ERR("Can't set pan to %ld (%x)\n", DSImpl->pan, hr);
+                ERR("Can't set pan to %d (%x)\n", DSImpl->pan, hr);
 
             DSImpl->write_pos = 0;
             hr = S_OK;
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 66a9a95..7a156e5 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -45,14 +45,14 @@
 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
 
 typedef struct {
-    HWND hWnd;      /* Target window */
-    long msg;       /* User window message */
-    long instance;  /* User data */
-    int  disabled;  /* Disabled messages posting */
+    HWND     hWnd;      /* Target window */
+    LONG     msg;       /* User window message */
+    LONG_PTR instance;  /* User data */
+    int      disabled;  /* Disabled messages posting */
 } WndNotify;
 
 typedef struct {
-    long lEventCode;   /* Event code */
+    LONG lEventCode;   /* Event code */
     LONG_PTR lParam1;  /* Param1 */
     LONG_PTR lParam2;  /* Param2 */
 } Event;
@@ -120,7 +120,7 @@ static int EventsQueue_PutEvent(EventsQueue* omr, const Event* evt)
     return TRUE;
 }
 
-static int EventsQueue_GetEvent(EventsQueue* omr, Event* evt, long msTimeOut)
+static int EventsQueue_GetEvent(EventsQueue* omr, Event* evt, LONG msTimeOut)
 {
     if (WaitForSingleObject(omr->msg_event, msTimeOut) != WAIT_OBJECT_0)
 	return FALSE;
@@ -182,7 +182,7 @@ typedef struct _IFilterGraphImpl {
     LPWSTR * pFilterNames;
     int nFilters;
     int filterCapacity;
-    long nameIndex;
+    LONG nameIndex;
     IReferenceClock *refClock;
     EventsQueue evqueue;
     HANDLE hEventCompletion;
@@ -4970,7 +4970,7 @@ static HRESULT WINAPI MediaEvent_SetNotifyWindow(IMediaEventEx *iface,
 
     This->notif.hWnd = (HWND)hwnd;
     This->notif.msg = lMsg;
-    This->notif.instance = (long) lInstanceData;
+    This->notif.instance = lInstanceData;
 
     return S_OK;
 }
diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c
index 16b94e3..a1c4473 100644
--- a/dlls/quartz/memallocator.c
+++ b/dlls/quartz/memallocator.c
@@ -785,7 +785,7 @@ static HRESULT StdMemAllocator_Alloc(IMemAllocator * iface)
     StdMemAllocator *This = (StdMemAllocator *)iface;
     StdMediaSample2 * pSample = NULL;
     SYSTEM_INFO si;
-    long i;
+    LONG i;
 
     assert(list_empty(&This->base.free_list));
 
diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c
index ca34d93..fd0d5a2 100644
--- a/dlls/quartz/pin.c
+++ b/dlls/quartz/pin.c
@@ -1834,7 +1834,7 @@ HRESULT InputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinI
     return E_FAIL;
 }
 
-HRESULT OutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, long outputpin_size, const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin)
+HRESULT OutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin)
 {
     OutputPin * pPinImpl;
 
diff --git a/dlls/quartz/pin.h b/dlls/quartz/pin.h
index 2cbaddb..e356ef3 100644
--- a/dlls/quartz/pin.h
+++ b/dlls/quartz/pin.h
@@ -143,7 +143,7 @@ typedef struct PullPin
 
 /*** Constructors ***/
 HRESULT InputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo, SAMPLEPROC_PUSH pSampleProc, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, CLEANUPPROC pCleanUp, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin ** ppPin);
-HRESULT OutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, long outputpin_size, const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin);
+HRESULT OutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *props, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin);
 HRESULT PullPin_Construct(const IPinVtbl *PullPin_Vtbl, const PIN_INFO * pPinInfo, SAMPLEPROC_PULL pSampleProc, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, CLEANUPPROC pCleanUp, STOPPROCESSPROC, REQUESTPROC pCustomRequest, LPCRITICAL_SECTION pCritSec, IPin ** ppPin);
 
 /**************************/
diff --git a/dlls/quartz/tests/referenceclock.c b/dlls/quartz/tests/referenceclock.c
index 164fc3d..e20e8c4 100644
--- a/dlls/quartz/tests/referenceclock.c
+++ b/dlls/quartz/tests/referenceclock.c
@@ -54,7 +54,7 @@ static void test_IReferenceClock_methods(const char * clockdesc, IReferenceClock
     HRESULT hr;
     REFERENCE_TIME time1;
     REFERENCE_TIME time2;
-    signed long diff;
+    LONG diff;
 
     /* Test response from invalid (NULL) argument */
     hr = IReferenceClock_GetTime(pClock, NULL);
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index 845921c..8f9341d 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -344,7 +344,7 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample)
 {
     VideoRendererImpl *This = iface;
     LPBYTE pbSrcStream = NULL;
-    long cbSrcStream = 0;
+    LONG cbSrcStream = 0;
     REFERENCE_TIME tStart, tStop;
     HRESULT hr;
 
@@ -396,7 +396,7 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample)
 
     cbSrcStream = IMediaSample_GetActualDataLength(pSample);
 
-    TRACE("val %p %ld\n", pbSrcStream, cbSrcStream);
+    TRACE("val %p %d\n", pbSrcStream, cbSrcStream);
 
 #if 0 /* For debugging purpose */
     {
-- 
1.7.1



More information about the wine-patches mailing list