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:
authorXhmikosR <xhmikosr@users.sourceforge.net>2013-05-11 20:02:41 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2013-05-18 18:49:06 +0400
commit332f1b6f39bed91667b4787e205248a6e87a1f6f (patch)
tree9a65fd3da84346cd2b2b1fe7822d16f580f6fd5f /include
parent551082864db1711e3d5c3b598485c51c4ccd1320 (diff)
include/atl: remove extra arguments from format strings and use the right field type specifier.
Diffstat (limited to 'include')
-rw-r--r--include/atl/atlperf.inl18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/atl/atlperf.inl b/include/atl/atlperf.inl
index 398fd1b0a..9a419815e 100644
--- a/include/atl/atlperf.inl
+++ b/include/atl/atlperf.inl
@@ -154,7 +154,7 @@ inline CAtlFileMappingBase* CPerfMon::_OpenNextBlock(CAtlFileMappingBase* pPrev)
_ATLTRY
{
CString strName;
- strName.Format(_T("Global\\ATLPERF_%s_%3.3d"), GetAppName(), dwNextBlockIndex);
+ strName.Format(_T("Global\\ATLPERF_%s_%3.3u"), GetAppName(), dwNextBlockIndex);
HRESULT hr = spMem->OpenMapping(strName, m_nAllocSize, 0, FILE_MAP_READ);
if (FAILED(hr))
@@ -204,7 +204,7 @@ inline CAtlFileMappingBase* CPerfMon::_AllocNewBlock(CAtlFileMappingBase* pPrev,
BOOL bExisted = FALSE;
CString strName;
- strName.Format(_T("Global\\ATLPERF_%s_%3.3d"), GetAppName(), dwNextBlockIndex);
+ strName.Format(_T("Global\\ATLPERF_%s_%3.3u"), GetAppName(), dwNextBlockIndex);
HRESULT hr = spMem->MapSharedMem(m_nAllocSize, strName, &bExisted, &sa);
if (FAILED(hr))
@@ -2428,8 +2428,8 @@ ATL_NOINLINE inline HRESULT CPerfMon::PersistToXML(IStream *pStream, BOOL bFirst
CAtlFileMappingBase *pCurrentBlock = _GetNextBlock(NULL);
CPerfObject *pInstance = _GetFirstInstance(pCurrentBlock);
- strXML.Format("\t\t<perfObject perfid=\"%d\">\r\n",
- pCategoryInfo->m_dwCategoryId, pCategoryInfo->m_nNameId, pCategoryInfo->m_nHelpId);
+ strXML.Format("\t\t<perfObject perfid=\"%u\">\r\n",
+ pCategoryInfo->m_dwCategoryId);
hr = pStream->Write(strXML, strXML.GetLength(), &nLen);
if (hr != S_OK)
@@ -2453,7 +2453,7 @@ ATL_NOINLINE inline HRESULT CPerfMon::PersistToXML(IStream *pStream, BOOL bFirst
nLength = AtlUnicodeToUTF8(wszInstNameSrc, nInstLen, szUTF8, nLength);
szUTF8[nLength] = '\0';
- strXML.Format("\t\t\t<instance name=\"%s\" id=\"%d\">\r\n", szUTF8, pInstance->m_dwInstance);
+ strXML.Format("\t\t\t<instance name=\"%s\" id=\"%u\">\r\n", szUTF8, pInstance->m_dwInstance);
hr = pStream->Write(strXML, strXML.GetLength(), &nLen);
if (hr != S_OK)
return hr;
@@ -2466,14 +2466,14 @@ ATL_NOINLINE inline HRESULT CPerfMon::PersistToXML(IStream *pStream, BOOL bFirst
{
case PERF_SIZE_DWORD:
{
- strXML.Format("\t\t\t\t<counter type=\"perf_size_dword\" value=\"%d\" offset=\"%d\"/>\r\n",
+ strXML.Format("\t\t\t\t<counter type=\"perf_size_dword\" value=\"%u\" offset=\"%u\"/>\r\n",
*LPDWORD(LPBYTE(pInstance)+pCounterInfo->m_nDataOffset),
pCounterInfo->m_nDataOffset);
break;
}
case PERF_SIZE_LARGE:
{
- strXML.Format("\t\t\t\t<counter type=\"perf_size_large\" value=\"%d\" offset=\"%d\"/>\r\n",
+ strXML.Format("\t\t\t\t<counter type=\"perf_size_large\" value=\"%u\" offset=\"%u\"/>\r\n",
*PULONGLONG(LPBYTE(pInstance)+pCounterInfo->m_nDataOffset),
pCounterInfo->m_nDataOffset);
break;
@@ -2492,7 +2492,7 @@ ATL_NOINLINE inline HRESULT CPerfMon::PersistToXML(IStream *pStream, BOOL bFirst
nLen = AtlUnicodeToUTF8(LPCWSTR(pSrc), nTextLen, szUTF8, nLen);
szUTF8[nLen] = '\0';
- strXML.Format("\t\t\t\t<counter type=\"perf_size_variable_len_unicode\" value=\"%s\" offset=\"%d\"/>\r\n",
+ strXML.Format("\t\t\t\t<counter type=\"perf_size_variable_len_unicode\" value=\"%s\" offset=\"%u\"/>\r\n",
szUTF8,
pCounterInfo->m_nDataOffset);
}
@@ -2502,7 +2502,7 @@ ATL_NOINLINE inline HRESULT CPerfMon::PersistToXML(IStream *pStream, BOOL bFirst
if (!szUTF8.Allocate(nTextLen+1))
return E_OUTOFMEMORY;
Checked::strcpy_s(szUTF8, nTextLen+1, LPCSTR(pSrc));
- strXML.Format("\t\t\t\t<counter type=\"perf_size_variable_len_ansi\" value=\"%s\" offset=\"%d\"/>\r\n",
+ strXML.Format("\t\t\t\t<counter type=\"perf_size_variable_len_ansi\" value=\"%s\" offset=\"%u\"/>\r\n",
szUTF8,
pCounterInfo->m_nDataOffset);
}