diff options
author | kinddragon <kinddragon@users.sourceforge.net> | 2010-05-29 08:04:26 +0400 |
---|---|---|
committer | kinddragon <kinddragon@users.sourceforge.net> | 2010-05-29 08:04:26 +0400 |
commit | 158e31fbcc38e59cba2451ad5a2bccf69ea697d1 (patch) | |
tree | 1b926f2877ee61d5f052a559fc2f67c10f8bc0eb /src/filters/BaseClasses | |
parent | 02072325a68d4fb294c3ba4f58048c42de3b9e0a (diff) |
A lot of compiler L4 warnings fixed (some warnings disabled)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1982 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/BaseClasses')
-rw-r--r-- | src/filters/BaseClasses/outputq.cpp | 4 | ||||
-rw-r--r-- | src/filters/BaseClasses/pullpin.cpp | 3 | ||||
-rw-r--r-- | src/filters/BaseClasses/schedule.cpp | 22 | ||||
-rw-r--r-- | src/filters/BaseClasses/videoctl.cpp | 1 | ||||
-rw-r--r-- | src/filters/BaseClasses/winutil.cpp | 12 | ||||
-rw-r--r-- | src/filters/BaseClasses/wxutil.cpp | 3 |
6 files changed, 28 insertions, 17 deletions
diff --git a/src/filters/BaseClasses/outputq.cpp b/src/filters/BaseClasses/outputq.cpp index d3ab6175e..63bd5c898 100644 --- a/src/filters/BaseClasses/outputq.cpp +++ b/src/filters/BaseClasses/outputq.cpp @@ -205,8 +205,8 @@ DWORD COutputQueue::ThreadProc() while (TRUE) {
BOOL bWait = FALSE;
IMediaSample *pSample;
- LONG lNumberToSend; // Local copy
- NewSegmentPacket* ppacket;
+ LONG lNumberToSend = 0; // Local copy
+ NewSegmentPacket* ppacket = NULL;
//
// Get a batch of samples and send it if possible
diff --git a/src/filters/BaseClasses/pullpin.cpp b/src/filters/BaseClasses/pullpin.cpp index a197ba58a..2ad43cd0c 100644 --- a/src/filters/BaseClasses/pullpin.cpp +++ b/src/filters/BaseClasses/pullpin.cpp @@ -11,6 +11,8 @@ #include <streams.h>
#include "pullpin.h"
+#define UNUSED_ALWAYS(x) x
+
#ifdef DXMPERF
#include "dxmperf.h"
#endif // DXMPERF
@@ -578,6 +580,7 @@ CPullPin::CleanupCancelled(void) 0, // no wait
&pSample,
&dwUnused);
+ UNUSED_ALWAYS(hr);
if(pSample) {
pSample->Release();
} else {
diff --git a/src/filters/BaseClasses/schedule.cpp b/src/filters/BaseClasses/schedule.cpp index 1b4a38190..5611185c9 100644 --- a/src/filters/BaseClasses/schedule.cpp +++ b/src/filters/BaseClasses/schedule.cpp @@ -117,24 +117,28 @@ HRESULT CAMSchedule::Unadvise(DWORD_PTR dwAdviseCookie) CAdvisePacket * p_prev = &head;
CAdvisePacket * p_n;
m_Serialize.Lock();
- while ( p_n = p_prev->Next() ) // The Next() method returns NULL when it hits z
+ p_n = p_prev->Next();
+ while ( p_n ) // The Next() method returns NULL when it hits z
{
if ( p_n->m_dwAdviseCookie == dwAdviseCookie )
{
Delete( p_prev->RemoveNext() );
--m_dwAdviseCount;
hr = S_OK;
- // Having found one cookie that matches, there should be no more
- #ifdef _DEBUG
- while (p_n = p_prev->Next())
- {
- ASSERT(p_n->m_dwAdviseCookie != dwAdviseCookie);
- p_prev = p_n;
- }
- #endif
+ // Having found one cookie that matches, there should be no more
+#ifdef _DEBUG
+ p_n = p_prev->Next();
+ while (p_n)
+ {
+ ASSERT(p_n->m_dwAdviseCookie != dwAdviseCookie);
+ p_prev = p_n;
+ p_n = p_prev->Next();
+ }
+#endif
break;
}
p_prev = p_n;
+ p_n = p_prev->Next();
};
m_Serialize.Unlock();
return hr;
diff --git a/src/filters/BaseClasses/videoctl.cpp b/src/filters/BaseClasses/videoctl.cpp index b12ccbd37..c75a813e6 100644 --- a/src/filters/BaseClasses/videoctl.cpp +++ b/src/filters/BaseClasses/videoctl.cpp @@ -603,7 +603,6 @@ HRESULT CLoadDirectDraw::LoadDirectDraw(__in LPSTR szDevice) PDRAWCREATE pDrawCreate;
PDRAWENUM pDrawEnum;
LPDIRECTDRAWENUMERATEEXA pDrawEnumEx;
- HRESULT hr = NOERROR;
NOTE("Entering DoLoadDirectDraw");
diff --git a/src/filters/BaseClasses/winutil.cpp b/src/filters/BaseClasses/winutil.cpp index e5a63cc02..2648da5fa 100644 --- a/src/filters/BaseClasses/winutil.cpp +++ b/src/filters/BaseClasses/winutil.cpp @@ -13,6 +13,8 @@ #include <strsafe.h>
#include <checkbmi.h>
+#define UNUSED_ALWAYS(x) x
+
static UINT MsgDestroy;
// Constructor
@@ -556,8 +558,10 @@ HRESULT CBaseWindow::InitialiseWindow(HWND hwnd) if (m_bDoGetDC)
{
- EXECUTE_ASSERT(m_hdc = GetDC(hwnd));
- EXECUTE_ASSERT(m_MemoryDC = CreateCompatibleDC(m_hdc));
+ m_hdc = GetDC(hwnd);
+ EXECUTE_ASSERT(m_hdc);
+ m_MemoryDC = CreateCompatibleDC(m_hdc);
+ EXECUTE_ASSERT(m_MemoryDC);
EXECUTE_ASSERT(SetStretchBltMode(m_hdc,COLORONCOLOR));
EXECUTE_ASSERT(SetStretchBltMode(m_MemoryDC,COLORONCOLOR));
@@ -2445,6 +2449,7 @@ HRESULT CImageDisplay::UpdateFormat(__inout VIDEOINFO *pVideoInfo) ASSERT(pVideoInfo);
BITMAPINFOHEADER *pbmi = HEADER(pVideoInfo);
+ UNUSED_ALWAYS(pbmi);
SetRectEmpty(&pVideoInfo->rcSource);
SetRectEmpty(&pVideoInfo->rcTarget);
@@ -2676,7 +2681,8 @@ STDAPI ConvertVideoInfoToVideoInfo2(__inout AM_MEDIA_TYPE *pmt) if (NULL == pmt->pbFormat || pmt->cbFormat < sizeof(VIDEOINFOHEADER)) {
return E_INVALIDARG;
}
- VIDEOINFO *pVideoInfo = (VIDEOINFO *)pmt->pbFormat;
+ VIDEOINFO *pVideoInfo = (VIDEOINFO *)pmt->pbFormat;
+ UNUSED_ALWAYS(pVideoInfo);
DWORD dwNewSize;
HRESULT hr = DWordAdd(pmt->cbFormat, sizeof(VIDEOINFOHEADER2) - sizeof(VIDEOINFOHEADER), &dwNewSize);
if (FAILED(hr)) {
diff --git a/src/filters/BaseClasses/wxutil.cpp b/src/filters/BaseClasses/wxutil.cpp index 271f68da0..ad086d10b 100644 --- a/src/filters/BaseClasses/wxutil.cpp +++ b/src/filters/BaseClasses/wxutil.cpp @@ -55,7 +55,7 @@ BOOL CAMMsgEvent::WaitMsg(DWORD dwTimeout) // timeout (in MS) to expire. allow SENT messages
// to be processed while we wait
DWORD dwWait;
- DWORD dwStartTime;
+ DWORD dwStartTime = 0;
// set the waiting period.
DWORD dwWaitTime = dwTimeout;
@@ -512,7 +512,6 @@ bool CCritSec::TryLock() {
UINT tracelevel=3;
DWORD us = GetCurrentThreadId();
- DWORD currentOwner = m_currentOwner;
BOOL bSuccess = TryEnterCriticalSection(&m_CritSec);
if (bSuccess)
{
|