Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkinddragon <kinddragon@users.sourceforge.net>2010-05-29 08:04:26 +0400
committerkinddragon <kinddragon@users.sourceforge.net>2010-05-29 08:04:26 +0400
commit158e31fbcc38e59cba2451ad5a2bccf69ea697d1 (patch)
tree1b926f2877ee61d5f052a559fc2f67c10f8bc0eb /src/filters/source
parent02072325a68d4fb294c3ba4f58048c42de3b9e0a (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/source')
-rw-r--r--src/filters/source/BaseSource/BaseSource.h3
-rw-r--r--src/filters/source/D2VSource/MPEG2Dec.cpp44
-rw-r--r--src/filters/source/DTSAC3Source/DTSAC3Source.cpp6
-rw-r--r--src/filters/source/FLICSource/FLICSource.cpp9
-rw-r--r--src/filters/source/FlacSource/FlacSource.cpp2
-rw-r--r--src/filters/source/ShoutcastSource/ShoutcastSource.cpp10
-rw-r--r--src/filters/source/ShoutcastSource/ShoutcastSource.h2
7 files changed, 53 insertions, 23 deletions
diff --git a/src/filters/source/BaseSource/BaseSource.h b/src/filters/source/BaseSource/BaseSource.h
index 91e2ccdb8..0ab2d1cf4 100644
--- a/src/filters/source/BaseSource/BaseSource.h
+++ b/src/filters/source/BaseSource/BaseSource.h
@@ -76,7 +76,8 @@ public:
if(!ppszFileName) return E_POINTER;
nCount = m_fn.GetLength()+1;
- if(!(*ppszFileName = (LPOLESTR)CoTaskMemAlloc(nCount*sizeof(WCHAR))))
+ *ppszFileName = (LPOLESTR)CoTaskMemAlloc(nCount*sizeof(WCHAR));
+ if(!(*ppszFileName))
return E_OUTOFMEMORY;
wcscpy_s(*ppszFileName, nCount, m_fn);
diff --git a/src/filters/source/D2VSource/MPEG2Dec.cpp b/src/filters/source/D2VSource/MPEG2Dec.cpp
index 4be664c00..4e7bdc87c 100644
--- a/src/filters/source/D2VSource/MPEG2Dec.cpp
+++ b/src/filters/source/D2VSource/MPEG2Dec.cpp
@@ -813,7 +813,8 @@ void CMPEG2Dec::sequence_header()
vbv_buffer_size = Get_Bits(10);
constrained_parameters_flag = Get_Bits(1);
- if (load_intra_quantizer_matrix = Get_Bits(1))
+ load_intra_quantizer_matrix = Get_Bits(1);
+ if (load_intra_quantizer_matrix)
{
for (i=0; i<64; i++)
intra_quantizer_matrix[scan[ZIG_ZAG][i]] = Get_Bits(8);
@@ -824,7 +825,8 @@ void CMPEG2Dec::sequence_header()
intra_quantizer_matrix[i] = default_intra_quantizer_matrix[i];
}
- if (load_non_intra_quantizer_matrix = Get_Bits(1))
+ load_non_intra_quantizer_matrix = Get_Bits(1);
+ if (load_non_intra_quantizer_matrix)
{
for (i=0; i<64; i++)
non_intra_quantizer_matrix[scan[ZIG_ZAG][i]] = Get_Bits(8);
@@ -988,21 +990,25 @@ void CMPEG2Dec::quant_matrix_extension()
{
int i;
- if (load_intra_quantizer_matrix = Get_Bits(1))
+ load_intra_quantizer_matrix = Get_Bits(1);
+ if (load_intra_quantizer_matrix)
for (i=0; i<64; i++)
chroma_intra_quantizer_matrix[scan[ZIG_ZAG][i]]
= intra_quantizer_matrix[scan[ZIG_ZAG][i]] = Get_Bits(8);
- if (load_non_intra_quantizer_matrix = Get_Bits(1))
+ load_non_intra_quantizer_matrix = Get_Bits(1);
+ if (load_non_intra_quantizer_matrix)
for (i=0; i<64; i++)
chroma_non_intra_quantizer_matrix[scan[ZIG_ZAG][i]]
= non_intra_quantizer_matrix[scan[ZIG_ZAG][i]] = Get_Bits(8);
-
- if (load_chroma_intra_quantizer_matrix = Get_Bits(1))
+
+ load_chroma_intra_quantizer_matrix = Get_Bits(1);
+ if (load_chroma_intra_quantizer_matrix)
for (i=0; i<64; i++)
chroma_intra_quantizer_matrix[scan[ZIG_ZAG][i]] = Get_Bits(8);
- if (load_chroma_non_intra_quantizer_matrix = Get_Bits(1))
+ load_chroma_non_intra_quantizer_matrix = Get_Bits(1);
+ if (load_chroma_non_intra_quantizer_matrix)
for (i=0; i<64; i++)
chroma_non_intra_quantizer_matrix[scan[ZIG_ZAG][i]] = Get_Bits(8);
}
@@ -1775,6 +1781,11 @@ void CMPEG2Dec::Decode_MPEG2_Intra_Block(int comp, int dc_dct_pred[])
case 2:
val = (dc_dct_pred[2]+= Get_Chroma_DC_dct_diff());
break;
+
+ default: // ERROR
+ ASSERT(FALSE);
+ val = 0;
+ break;
}
bp[0] = val << (3-intra_dc_precision);
@@ -1831,7 +1842,8 @@ void CMPEG2Dec::Decode_MPEG2_Intra_Block(int comp, int dc_dct_pred[])
i+= Get_Bits(6);
val = Get_Bits(12);
- if (sign = (val>=2048))
+ sign = (val>=2048);
+ if (sign)
val = 4096 - val;
}
@@ -1901,7 +1913,8 @@ void CMPEG2Dec::Decode_MPEG2_Non_Intra_Block(int comp)
i+= Get_Bits(6);
val = Get_Bits(12);
- if (sign = (val>=2048))
+ sign = (val>=2048);
+ if (sign)
val = 4096 - val;
}
@@ -1929,6 +1942,11 @@ int CMPEG2Dec::Get_macroblock_type()
case B_TYPE:
macroblock_type = Get_B_macroblock_type();
break;
+
+ default: //ERROR
+ ASSERT(FALSE);
+ macroblock_type = 0;
+ break;
}
return macroblock_type;
@@ -3736,11 +3754,13 @@ static char* myfgets(char* buff, int len, FILE* file)
char* ret = buff;
ret[0] = 0;
-
- while(ret = fgets(buff, len, file))
+
+ ret = fgets(buff, len, file);
+ while(ret)
{
while(isspace(*ret)) ret++;
if(*ret) break;
+ ret = fgets(buff, len, file);
}
return(ret);
@@ -4150,7 +4170,7 @@ int CMPEG2Dec::Open(LPCTSTR path, DstFormat dstFormat)
void CMPEG2Dec::Decode(unsigned char *dst, DWORD frame, int pitch)
{
- DWORD i, now, size, origin, ref, fo;
+ DWORD i, now, size = 0, origin, ref, fo = 0;
int remain;
CMPEG2Dec* in = this;
diff --git a/src/filters/source/DTSAC3Source/DTSAC3Source.cpp b/src/filters/source/DTSAC3Source/DTSAC3Source.cpp
index fc6251abf..3bec4c649 100644
--- a/src/filters/source/DTSAC3Source/DTSAC3Source.cpp
+++ b/src/filters/source/DTSAC3Source/DTSAC3Source.cpp
@@ -175,6 +175,11 @@ CDTSAC3Stream::CDTSAC3Stream(const WCHAR* wfn, CSource* pParent, HRESULT* phr)
int audiochannelarrangement = (buff[3]&15)<<2|(buff[4]>>6); // 6
int freq = (buff[4]>>2)&15; // 4
int transbitrate = ((buff[4]&3)<<3)|(buff[5]>>5); // 5
+ UNUSED_ALWAYS(frametype);
+ UNUSED_ALWAYS(deficitsamplecount);
+ UNUSED_ALWAYS(crcpresent);
+ UNUSED_ALWAYS(npcmsampleblocks);
+ UNUSED_ALWAYS(audiochannelarrangement);
int freqtbl[] =
{
@@ -321,6 +326,7 @@ HRESULT CDTSAC3Stream::FillBuffer(IMediaSample* pSample, int nFrame, BYTE* pOut,
const GUID* majortype = &m_mt.majortype;
const GUID* subtype = &m_mt.subtype;
+ UNUSED_ALWAYS(subtype);
if(*majortype == MEDIATYPE_DVD_ENCRYPTED_PACK)
{
diff --git a/src/filters/source/FLICSource/FLICSource.cpp b/src/filters/source/FLICSource/FLICSource.cpp
index 1c291cd33..c0f10cdc8 100644
--- a/src/filters/source/FLICSource/FLICSource.cpp
+++ b/src/filters/source/FLICSource/FLICSource.cpp
@@ -133,7 +133,8 @@ STDMETHODIMP CFLICSource::GetCurFile(LPOLESTR* ppszFileName, AM_MEDIA_TYPE* pmt)
{
if(!ppszFileName) return E_POINTER;
- if(!(*ppszFileName = (LPOLESTR)CoTaskMemAlloc((m_fn.GetLength()+1)*sizeof(WCHAR))))
+ *ppszFileName = (LPOLESTR)CoTaskMemAlloc((m_fn.GetLength()+1)*sizeof(WCHAR));
+ if(!(*ppszFileName))
return E_OUTOFMEMORY;
wcscpy(*ppszFileName, m_fn);
@@ -222,7 +223,7 @@ CFLICStream::CFLICStream(const WCHAR* wfn, CFLICSource* pParent, HRESULT* phr)
|| fc.type == FLIC_BLACK
|| fc.type == FLIC_COPY);
- __int64 pos = m_flic.GetPosition() + fc.size - sizeof(fc);
+ ULONGLONG pos = m_flic.GetPosition() + fc.size - sizeof(fc);
if(m_flic.Seek(pos, CFile::begin) != pos)
break;
@@ -231,7 +232,7 @@ CFLICStream::CFLICStream(const WCHAR* wfn, CFLICSource* pParent, HRESULT* phr)
if(chunk < ffe.hdr.chunks)
break;
- __int64 pos = ffe.pos + ffe.hdr.size - sizeof(ffe.hdr);
+ ULONGLONG pos = ffe.pos + ffe.hdr.size - sizeof(ffe.hdr);
if(m_flic.Seek(pos, CFile::begin) != pos)
break;
@@ -536,7 +537,7 @@ void CFLICStream::ExtractFrame(int nFrame)
if(m_flic.Read(&fc, sizeof(fc)) != sizeof(fc))
break;
- __int64 next = m_flic.GetPosition() + fc.size - sizeof(fc);
+ ULONGLONG next = m_flic.GetPosition() + fc.size - sizeof(fc);
switch(fc.type)
{
diff --git a/src/filters/source/FlacSource/FlacSource.cpp b/src/filters/source/FlacSource/FlacSource.cpp
index 5283edfd1..9f0cf22b7 100644
--- a/src/filters/source/FlacSource/FlacSource.cpp
+++ b/src/filters/source/FlacSource/FlacSource.cpp
@@ -330,7 +330,7 @@ FLAC__bool StreamDecoderEof(const FLAC__StreamDecoder *decoder, void *client_dat
FLAC__StreamDecoderWriteStatus StreamDecoderWrite(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
{
CFlacStream* pThis = static_cast<CFlacStream*> (client_data);
-
+ UNUSED_ALWAYS(pThis);
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
}
diff --git a/src/filters/source/ShoutcastSource/ShoutcastSource.cpp b/src/filters/source/ShoutcastSource/ShoutcastSource.cpp
index 75bdf8d51..a25bfe871 100644
--- a/src/filters/source/ShoutcastSource/ShoutcastSource.cpp
+++ b/src/filters/source/ShoutcastSource/ShoutcastSource.cpp
@@ -189,7 +189,8 @@ STDMETHODIMP CShoutcastSource::GetCurFile(LPOLESTR* ppszFileName, AM_MEDIA_TYPE*
{
if(!ppszFileName) return E_POINTER;
- if(!(*ppszFileName = (LPOLESTR)CoTaskMemAlloc((m_fn.GetLength()+1)*sizeof(WCHAR))))
+ *ppszFileName = (LPOLESTR)CoTaskMemAlloc((m_fn.GetLength()+1)*sizeof(WCHAR));
+ if(!(*ppszFileName))
return E_OUTOFMEMORY;
wcscpy(*ppszFileName, m_fn);
@@ -491,7 +492,7 @@ HRESULT CShoutcastStream::OnThreadDestroy()
fExitThread = true;
m_socket.CancelBlockingCall();
- WaitForSingleObject(m_hSocketThread, -1);
+ WaitForSingleObject(m_hSocketThread, (DWORD)-1);
return NOERROR;
}
@@ -615,6 +616,7 @@ bool CShoutcastStream::CShoutcastSocket::Connect(CUrl& url)
do
{
int len = Send((BYTE*)(LPCSTR)str, str.GetLength());
+ UNUSED_ALWAYS(len);
m_nBytesRead = 0;
m_metaint = metaint = 0;
@@ -673,8 +675,8 @@ bool CShoutcastStream::CShoutcastSocket::Connect(CUrl& url)
bool CShoutcastStream::CShoutcastSocket::FindSync()
{
- m_freq = -1;
- m_channels = -1;
+ m_freq = (DWORD)-1;
+ m_channels = (DWORD)-1;
BYTE b;
for(int i = MAXFRAMESIZE; i > 0; i--, Receive(&b, 1))
diff --git a/src/filters/source/ShoutcastSource/ShoutcastSource.h b/src/filters/source/ShoutcastSource/ShoutcastSource.h
index fd512afcf..e8ef4c51a 100644
--- a/src/filters/source/ShoutcastSource/ShoutcastSource.h
+++ b/src/filters/source/ShoutcastSource/ShoutcastSource.h
@@ -84,7 +84,7 @@ class CShoutcastStream : public CSourceStream
BYTE* pData;
REFERENCE_TIME rtStart, rtStop;
CString title;
- mp3frame(DWORD len = 0) {pData = (this->len = len) ? DNew BYTE[len] : NULL; rtStart = rtStop = 0;}
+ mp3frame(DWORD len = 0) {this->len = len; pData = len ? DNew BYTE[len] : NULL; rtStart = rtStop = 0;}
mp3frame(const mp3frame& f) {*this = f;}
~mp3frame() {delete pData;}
void operator = (const mp3frame& f)