From 079bb8a51d550d0238235cd3ba0b957c094662f0 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Sun, 8 Oct 2006 19:36:31 +0200 Subject: [PATCH] qcap: Win64 printf format warning fixes. --- dlls/qcap/Makefile.in | 1 - dlls/qcap/capturegraph.c | 4 ++-- dlls/qcap/enummedia.c | 6 +++--- dlls/qcap/enumpins.c | 4 ++-- dlls/qcap/pin.c | 6 +++--- dlls/qcap/v4l.c | 14 +++++++------- dlls/qcap/vfwcapture.c | 18 +++++++++--------- 7 files changed, 26 insertions(+), 27 deletions(-) diff --git a/dlls/qcap/Makefile.in b/dlls/qcap/Makefile.in index 1943a705bd4..0b6805ab551 100644 --- a/dlls/qcap/Makefile.in +++ b/dlls/qcap/Makefile.in @@ -5,7 +5,6 @@ VPATH = @srcdir@ MODULE = qcap.dll IMPORTS = ole32 oleaut32 user32 gdi32 advapi32 kernel32 EXTRALIBS = -lstrmiids -luuid -EXTRADEFS = -DWINE_NO_LONG_AS_INT C_SRCS = \ capturegraph.c \ diff --git a/dlls/qcap/capturegraph.c b/dlls/qcap/capturegraph.c index a656ba26bd9..32117905942 100644 --- a/dlls/qcap/capturegraph.c +++ b/dlls/qcap/capturegraph.c @@ -145,7 +145,7 @@ fnCaptureGraphBuilder2_AddRef(ICaptureGraphBuilder2 * iface) CaptureGraphImpl *This = impl_from_ICaptureGraphBuilder2(iface); DWORD ref = InterlockedIncrement(&This->ref); - TRACE("(%p/%p)->() AddRef from %ld\n", This, iface, ref - 1); + TRACE("(%p/%p)->() AddRef from %d\n", This, iface, ref - 1); return ref; } @@ -155,7 +155,7 @@ fnCaptureGraphBuilder2_Release(ICaptureGraphBuilder2 * iface) CaptureGraphImpl *This = impl_from_ICaptureGraphBuilder2(iface); DWORD ref = InterlockedDecrement(&This->ref); - TRACE("(%p/%p)->() Release from %ld\n", This, iface, ref + 1); + TRACE("(%p/%p)->() Release from %d\n", This, iface, ref + 1); if (!ref) { diff --git a/dlls/qcap/enummedia.c b/dlls/qcap/enummedia.c index 8f3361111a7..a82a94c9bf7 100644 --- a/dlls/qcap/enummedia.c +++ b/dlls/qcap/enummedia.c @@ -189,8 +189,8 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Next(IEnumMediaTypes * iface, cFetched = min(This->enumMediaDetails.cMediaTypes, This->uIndex + cMediaTypes) - This->uIndex; - TRACE("(%lu, %p, %p)\n", cMediaTypes, ppMediaTypes, pcFetched); - TRACE("Next uIndex: %lu, cFetched: %lu\n", This->uIndex, cFetched); + TRACE("(%u, %p, %p)\n", cMediaTypes, ppMediaTypes, pcFetched); + TRACE("Next uIndex: %u, cFetched: %u\n", This->uIndex, cFetched); if (cFetched > 0) { @@ -221,7 +221,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Skip(IEnumMediaTypes * iface, { IEnumMediaTypesImpl *This = (IEnumMediaTypesImpl *)iface; - TRACE("(%lu)\n", cMediaTypes); + TRACE("(%u)\n", cMediaTypes); if (This->uIndex + cMediaTypes < This->enumMediaDetails.cMediaTypes) { diff --git a/dlls/qcap/enumpins.c b/dlls/qcap/enumpins.c index 114ca88b23a..8b06fe7f528 100644 --- a/dlls/qcap/enumpins.c +++ b/dlls/qcap/enumpins.c @@ -116,7 +116,7 @@ static HRESULT WINAPI IEnumPinsImpl_Next(IEnumPins * iface, ULONG cPins, IPin ** cFetched = min(This->enumPinDetails.cPins, This->uIndex + cPins) - This->uIndex; - TRACE("(%lu, %p, %p)\n", cPins, ppPins, pcFetched); + TRACE("(%u, %p, %p)\n", cPins, ppPins, pcFetched); if (cFetched > 0) { @@ -141,7 +141,7 @@ static HRESULT WINAPI IEnumPinsImpl_Skip(IEnumPins * iface, ULONG cPins) { IEnumPinsImpl *This = (IEnumPinsImpl *)iface; - TRACE("(%lu)\n", cPins); + TRACE("(%u)\n", cPins); if (This->uIndex + cPins < This->enumPinDetails.cPins) { diff --git a/dlls/qcap/pin.c b/dlls/qcap/pin.c index 366563d19a1..d3063074c15 100644 --- a/dlls/qcap/pin.c +++ b/dlls/qcap/pin.c @@ -219,7 +219,7 @@ static HRESULT OutputPin_ConnectSpecific(IPin * iface, IPin * pReceivePin, const DeleteMediaType(&This->pin.mtCurrent); } - TRACE(" -- %lx\n", hr); + TRACE(" -- %x\n", hr); return hr; } @@ -318,7 +318,7 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI } /* if succeeded */ LeaveCriticalSection(This->pin.pCritSec); - TRACE(" -- %lx\n", hr); + TRACE(" -- %x\n", hr); return hr; } @@ -361,7 +361,7 @@ HRESULT OutputPin_GetDeliveryBuffer(OutputPin * This, IMediaSample ** ppSample, { HRESULT hr; - TRACE("(%p, %p, %p, %lx)\n", ppSample, tStart, tStop, dwFlags); + TRACE("(%p, %p, %p, %x)\n", ppSample, tStart, tStop, dwFlags); EnterCriticalSection(This->pin.pCritSec); { diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 5dc9b6afbb1..ea844d16255 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -241,7 +241,7 @@ HRESULT qcap_driver_set_format(Capture *capBox, AM_MEDIA_TYPE * mT) if (format->bmiHeader.biBitCount != 24 || format->bmiHeader.biCompression != BI_RGB) { - FIXME("unsupported media type %d %ld\n", format->bmiHeader.biBitCount, + FIXME("unsupported media type %d %d\n", format->bmiHeader.biBitCount, format->bmiHeader.biCompression ); return VFW_E_INVALIDMEDIATYPE; } @@ -299,7 +299,7 @@ HRESULT qcap_driver_get_format(Capture *capBox, AM_MEDIA_TYPE ** mT) mT[0]->bTemporalCompression = FALSE; mT[0]->pUnk = NULL; mT[0]->lSampleSize = capBox->outputwidth * capBox->outputheight * capBox->bitDepth / 8; - TRACE("Output format: %dx%d - %d bits = %lu KB\n", capBox->outputwidth, + TRACE("Output format: %dx%d - %d bits = %u KB\n", capBox->outputwidth, capBox->outputheight, capBox->bitDepth, mT[0]->lSampleSize/1024); vi->rcSource.left = 0; vi->rcSource.top = 0; vi->rcTarget.left = 0; vi->rcTarget.top = 0; @@ -608,14 +608,14 @@ static DWORD WINAPI ReadThread(LPVOID lParam) capBox->renderer(capBox, pOutput, pInput); Resize(capBox, pTarget, pOutput); hr = OutputPin_SendSample((OutputPin *)capBox->pOut, pSample); - TRACE("%p -> Frame %lu: %lx\n", capBox, ++framecount, hr); + TRACE("%p -> Frame %lu: %x\n", capBox, ++framecount, hr); IMediaSample_Release(pSample); V4l_FreeFrame(capBox); } LeaveCriticalSection(&capBox->CritSect); if (FAILED(hr) && hr != VFW_E_NOT_CONNECTED) { - ERR("Received error: %lx\n", hr); + ERR("Received error: %x\n", hr); goto cfail; } } @@ -678,7 +678,7 @@ HRESULT qcap_driver_run(Capture *capBox, FILTER_STATE *state) if (pAlloc) IMemAllocator_Release(pAlloc); - TRACE("Committing allocator: %lx\n", hr); + TRACE("Committing allocator: %x\n", hr); } thread = CreateThread(NULL, 0, ReadThread, capBox, 0, NULL); @@ -689,7 +689,7 @@ HRESULT qcap_driver_run(Capture *capBox, FILTER_STATE *state) LeaveCriticalSection(&capBox->CritSect); return S_OK; } - ERR("Creating thread failed.. %lx\n", GetLastError()); + ERR("Creating thread failed.. %x\n", GetLastError()); LeaveCriticalSection(&capBox->CritSect); return E_FAIL; } @@ -762,7 +762,7 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state) IPin_Release(pConnect); if (hr != S_OK && hr != VFW_E_NOT_COMMITTED) - WARN("Decommitting allocator: %lx\n", hr); + WARN("Decommitting allocator: %x\n", hr); } V4l_Unprepare(capBox); } diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index c3366022481..ace2b55978c 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -178,7 +178,7 @@ static ULONG WINAPI VfwCapture_AddRef(IBaseFilter * iface) VfwCapture *This = (VfwCapture *)iface; ULONG refCount = InterlockedIncrement(&This->refCount); - TRACE("%p->() New refcount: %ld\n", This, refCount); + TRACE("%p->() New refcount: %d\n", This, refCount); return refCount; } @@ -188,7 +188,7 @@ static ULONG WINAPI VfwCapture_Release(IBaseFilter * iface) VfwCapture *This = (VfwCapture *)iface; ULONG refCount = InterlockedDecrement(&This->refCount); - TRACE("%p->() New refcount: %ld\n", This, refCount); + TRACE("%p->() New refcount: %d\n", This, refCount); if (!refCount) { @@ -246,7 +246,7 @@ static HRESULT WINAPI VfwCapture_Pause(IBaseFilter * iface) static HRESULT WINAPI VfwCapture_Run(IBaseFilter * iface, REFERENCE_TIME tStart) { VfwCapture *This = (VfwCapture *)iface; - TRACE("(%lx%08lx)\n", (ULONG)(tStart >> 32), (ULONG)tStart); + TRACE("(%x%08x)\n", (ULONG)(tStart >> 32), (ULONG)tStart); return qcap_driver_run(This->driver_info, &This->state); } @@ -256,7 +256,7 @@ VfwCapture_GetState( IBaseFilter * iface, DWORD dwMilliSecsTimeout, { VfwCapture *This = (VfwCapture *)iface; - TRACE("(%lu, %p)\n", dwMilliSecsTimeout, pState); + TRACE("(%u, %p)\n", dwMilliSecsTimeout, pState); *pState = This->state; return S_OK; @@ -412,7 +412,7 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt) if (pin->pConnectedTo != NULL) { hr = IPin_QueryAccept(pin->pConnectedTo, pmt); - TRACE("Would accept: %ld\n", hr); + TRACE("Would accept: %d\n", hr); if (hr == S_FALSE) return VFW_E_INVALIDMEDIATYPE; } @@ -424,7 +424,7 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt) if (SUCCEEDED(hr)) TRACE("Reconnection completed, with new media format..\n"); } - TRACE("Returning: %ld\n", hr); + TRACE("Returning: %d\n", hr); return hr; } @@ -796,7 +796,7 @@ static ULONG WINAPI VfwPin_AddRef(IPin * iface) VfwPinImpl *This = (VfwPinImpl *)iface; ULONG refCount = InterlockedIncrement(&This->pin.pin.refCount); - TRACE("() -> new refcount: %lu\n", refCount); + TRACE("() -> new refcount: %u\n", refCount); return refCount; } @@ -807,7 +807,7 @@ VfwPin_Release(IPin * iface) VfwPinImpl *This = (VfwPinImpl *)iface; ULONG refCount = InterlockedDecrement(&This->pin.pin.refCount); - TRACE("() -> new refcount: %lu\n", refCount); + TRACE("() -> new refcount: %u\n", refCount); if (!refCount) { @@ -830,7 +830,7 @@ VfwPin_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum) emd.pMediaTypes = pmt; if (SUCCEEDED(hr)) hr = IEnumMediaTypesImpl_Construct(&emd, ppEnum); - TRACE("%p -- %lx\n", This, hr); + TRACE("%p -- %x\n", This, hr); DeleteMediaType(pmt); return hr; }