Skip to content

Commit

Permalink
Fixed compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
roman380 committed May 21, 2018
1 parent 63edade commit b64af84
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/FilterDetailsPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ void CInterfaceDetailsPage::OnBuildTree()

CMediaInfoPage* CMediaInfoPage::CreateInstance(LPUNKNOWN pUnk, HRESULT *phr, LPCTSTR pszFile, VARIANT_BOOL useCache)
{
CMediaInfo* info = CMediaInfo::GetInfoForFile(pszFile, useCache);
CMediaInfo* info = CMediaInfo::GetInfoForFile(pszFile, useCache != ATL_VARIANT_FALSE);
if (info == NULL) return NULL;
return new CMediaInfoPage(pUnk, phr, info);
}
Expand Down
6 changes: 4 additions & 2 deletions src/FilterReportGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ bool CFilterReportGenerator::GenerateReport()
// Copies the content from the stream to the buffer.
SIZE_T cbSize = ssStreamData.cbSize.LowPart;
CStringW strBuffer;
LPWSTR pwszBuffer = strBuffer.GetBuffer(cbSize / sizeof(WCHAR));
LPWSTR pwszBuffer = strBuffer.GetBuffer((int) (cbSize / sizeof(WCHAR)));
ULONG cbRead;
hr = outStream->Read(pwszBuffer, cbSize, &cbRead);
hr = outStream->Read(pwszBuffer, (ULONG) cbSize, &cbRead);
if (FAILED(hr))
{
strBuffer.ReleaseBuffer(0);
Expand Down Expand Up @@ -243,6 +243,7 @@ bool CFilterReportGenerator::WriteFilterCategory(CComPtr<IXmlWriter> &writer, co
}

if (!WriteEndElement(writer)) return false;
return true;
}

bool CFilterReportGenerator::EnumerateFiltersOfCategory(CComPtr<IXmlWriter>& writer, const CLSID& clsid)
Expand Down Expand Up @@ -512,6 +513,7 @@ bool CFilterReportGenerator::WriteFilterData(CComPtr<IXmlWriter> &writer, char *

if (!WriteEndElement(writer)) return false; // pin
}
return true;
}

bool CFilterReportGenerator::EnumerateFiltersOfDMOCategory(CComPtr<IXmlWriter>& writer, const CLSID& clsid)
Expand Down
2 changes: 1 addition & 1 deletion src/MediaInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CMediaInfo* CMediaInfo::GetInfoForFile(LPCTSTR pszFile, bool useCache=true)
fileName.MakeLower();

// search for file in cache (backwards because newer entries are appended to the end)
for (int i=storedInfos.GetCount()-1; i>=0; i--)
for (int i = (int) storedInfos.GetCount() - 1; i >= 0; i--)
if (storedInfos[i]->m_file == fileName)
return storedInfos[i];
}
Expand Down
2 changes: 1 addition & 1 deletion src/TextInfoForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ BOOL CTextInfoForm::PreTranslateMessage(MSG *pmsg)
case WM_KEYDOWN:
// Keys 1 to 6 change the report level
if (pmsg->wParam > 0x30 && pmsg->wParam <= 0x36) {
int sel = pmsg->wParam - 0x30 - 1;
int sel = (int) pmsg->wParam - 0x30 - 1;
combo_reporttype.SetCurSel(sel);
OnBnClickedButtonRefresh();
return TRUE;
Expand Down

0 comments on commit b64af84

Please sign in to comment.