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
path: root/src
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2013-05-11 20:03:04 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2013-05-18 19:01:19 +0400
commiteff7392e3a9896bf8bf72483833eae698e8a55a3 (patch)
tree1c7f6b303abd4c75754ee1313ee7d6e6ad638d7d /src
parent332f1b6f39bed91667b4787e205248a6e87a1f6f (diff)
Use the right field type specifier in function calls.
(/analyze warning C6340)
Diffstat (limited to 'src')
-rw-r--r--src/DSUtil/DSUtil.cpp12
-rw-r--r--src/DSUtil/FileVersionInfo.cpp2
-rw-r--r--src/DSUtil/MediaTypeEx.cpp102
-rw-r--r--src/Subtitles/STS.cpp2
-rw-r--r--src/Subtitles/USFSubtitles.cpp4
-rw-r--r--src/Subtitles/VobSubFile.cpp14
-rw-r--r--src/filters/muxer/BaseMuxer/BaseMuxer.cpp4
-rw-r--r--src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp6
-rw-r--r--src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp2
-rw-r--r--src/filters/parser/DSMSplitter/DSMSplitter.cpp2
-rw-r--r--src/filters/parser/MP4Splitter/MP4Splitter.cpp12
-rw-r--r--src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp2
-rw-r--r--src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp4
-rw-r--r--src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp4
-rw-r--r--src/filters/renderer/VideoRenderers/SyncRenderer.cpp16
-rw-r--r--src/filters/source/D2VSource/MPEG2Dec.cpp14
-rw-r--r--src/filters/source/FLACSource/FLACSource.cpp4
-rw-r--r--src/filters/source/ShoutcastSource/ShoutcastSource.cpp2
-rw-r--r--src/mpc-hc/AppSettings.cpp2
-rw-r--r--src/mpc-hc/DVBChannel.cpp8
-rw-r--r--src/mpc-hc/FavoriteOrganizeDlg.cpp2
-rw-r--r--src/mpc-hc/MainFrm.cpp42
-rw-r--r--src/mpc-hc/PPageAccelTbl.cpp2
-rw-r--r--src/mpc-hc/PPageAudioSwitcher.cpp2
-rw-r--r--src/mpc-hc/PPageSubStyle.cpp2
-rw-r--r--src/mpc-hc/PlayerCaptureDialog.h14
-rw-r--r--src/mpc-hc/PlayerSeekBar.cpp4
-rw-r--r--src/mpc-hc/PlayerStatusBar.cpp18
-rw-r--r--src/mpc-hc/TunerScanDlg.cpp6
-rw-r--r--src/mpc-hc/UpdateChecker.cpp2
-rw-r--r--src/mpc-hc/WebClientSocket.cpp4
-rw-r--r--src/mpc-hc/WebServer.cpp4
-rw-r--r--src/mpc-hc/mplayerc.cpp2
33 files changed, 161 insertions, 161 deletions
diff --git a/src/DSUtil/DSUtil.cpp b/src/DSUtil/DSUtil.cpp
index 8eb0f0c27..472958a42 100644
--- a/src/DSUtil/DSUtil.cpp
+++ b/src/DSUtil/DSUtil.cpp
@@ -103,7 +103,7 @@ void DumpStreamConfig(TCHAR* fn, IAMStreamConfig* pAMVSCCap)
s.AppendFormat(_T("\trcSource %d,%d,%d,%d\n"), vih->rcSource.left, vih->rcSource.top, vih->rcSource.right, vih->rcSource.bottom);
s.AppendFormat(_T("\trcTarget %d,%d,%d,%d\n"), vih->rcTarget.left, vih->rcTarget.top, vih->rcTarget.right, vih->rcTarget.bottom);
s.AppendFormat(_T("\tdwInterlaceFlags 0x%x\n"), vih->dwInterlaceFlags);
- s.AppendFormat(_T("\tdwPictAspectRatio %d:%d\n"), vih->dwPictAspectRatioX, vih->dwPictAspectRatioY);
+ s.AppendFormat(_T("\tdwPictAspectRatio %u:%u\n"), vih->dwPictAspectRatioX, vih->dwPictAspectRatioY);
f.WriteString(s);
} else {
DeleteMediaType(pmt);
@@ -114,9 +114,9 @@ void DumpStreamConfig(TCHAR* fn, IAMStreamConfig* pAMVSCCap)
s.AppendFormat(_T("\tbiCompression %x\n"), pbh->biCompression);
s.AppendFormat(_T("\tbiWidth %d\n"), pbh->biWidth);
s.AppendFormat(_T("\tbiHeight %d\n"), pbh->biHeight);
- s.AppendFormat(_T("\tbiBitCount %d\n"), pbh->biBitCount);
- s.AppendFormat(_T("\tbiPlanes %d\n"), pbh->biPlanes);
- s.AppendFormat(_T("\tbiSizeImage %d\n"), pbh->biSizeImage);
+ s.AppendFormat(_T("\tbiBitCount %u\n"), pbh->biBitCount);
+ s.AppendFormat(_T("\tbiPlanes %u\n"), pbh->biPlanes);
+ s.AppendFormat(_T("\tbiSizeImage %u\n"), pbh->biSizeImage);
f.WriteString(s);
DeleteMediaType(pmt);
@@ -2552,9 +2552,9 @@ CString DVDtimeToString(const DVD_HMSF_TIMECODE& rtVal, bool bAlwaysShowHours)
{
CString strTemp;
if (rtVal.bHours > 0 || bAlwaysShowHours) {
- strTemp.Format(_T("%02d:%02d:%02d"), rtVal.bHours, rtVal.bMinutes, rtVal.bSeconds);
+ strTemp.Format(_T("%02u:%02u:%02u"), rtVal.bHours, rtVal.bMinutes, rtVal.bSeconds);
} else {
- strTemp.Format(_T("%02d:%02d"), rtVal.bMinutes, rtVal.bSeconds);
+ strTemp.Format(_T("%02u:%02u"), rtVal.bMinutes, rtVal.bSeconds);
}
return strTemp;
}
diff --git a/src/DSUtil/FileVersionInfo.cpp b/src/DSUtil/FileVersionInfo.cpp
index 90d9b7374..bd7a1f8e3 100644
--- a/src/DSUtil/FileVersionInfo.cpp
+++ b/src/DSUtil/FileVersionInfo.cpp
@@ -64,7 +64,7 @@ CString CFileVersionInfo::GetFileVersionStr(LPCTSTR filePath)
CString strFileVersion;
if (LoadInfo(filePath, fileInfo)) {
- strFileVersion.Format(_T("%d.%d.%d.%d"),
+ strFileVersion.Format(_T("%u.%u.%u.%u"),
(fileInfo.dwFileVersionMS & 0xFFFF0000) >> 16,
(fileInfo.dwFileVersionMS & 0x0000FFFF),
(fileInfo.dwFileVersionLS & 0xFFFF0000) >> 16,
diff --git a/src/DSUtil/MediaTypeEx.cpp b/src/DSUtil/MediaTypeEx.cpp
index f8d36ddfd..2fd56034c 100644
--- a/src/DSUtil/MediaTypeEx.cpp
+++ b/src/DSUtil/MediaTypeEx.cpp
@@ -99,7 +99,7 @@ CString CMediaTypeEx::ToString(IPin* pPin)
rate += _T("fps ");
}
if (vih->dwBitRate) {
- rate.AppendFormat(_T("%dkbps"), vih->dwBitRate / 1000);
+ rate.AppendFormat(_T("%ukbps"), vih->dwBitRate / 1000);
}
} else if (formattype == FORMAT_VideoInfo2 || formattype == FORMAT_MPEG2_VIDEO || formattype == FORMAT_DiracVideoInfo) {
VIDEOINFOHEADER2* vih = (VIDEOINFOHEADER2*)pbFormat;
@@ -110,7 +110,7 @@ CString CMediaTypeEx::ToString(IPin* pPin)
rate += _T("fps ");
}
if (vih->dwBitRate) {
- rate.AppendFormat(_T("%dkbps"), vih->dwBitRate / 1000);
+ rate.AppendFormat(_T("%ukbps"), vih->dwBitRate / 1000);
}
}
@@ -130,44 +130,44 @@ CString CMediaTypeEx::ToString(IPin* pPin)
&& wfe->wFormatTag != WAVE_FORMAT_IEEE_FLOAT*/
|| subtype != GUID_NULL) {
codec = GetAudioCodecName(subtype, wfe->wFormatTag);
- dim.Format(_T("%dHz"), wfe->nSamplesPerSec);
+ dim.Format(_T("%uHz"), wfe->nSamplesPerSec);
if (wfe->nChannels == 1) {
dim += _T(" mono");
} else if (wfe->nChannels == 2) {
dim += _T(" stereo");
} else {
- dim.AppendFormat(_T(" %dch"), wfe->nChannels);
+ dim.AppendFormat(_T(" %uch"), wfe->nChannels);
}
if (wfe->nAvgBytesPerSec) {
- rate.Format(_T("%dkbps"), wfe->nAvgBytesPerSec * 8 / 1000);
+ rate.Format(_T("%ukbps"), wfe->nAvgBytesPerSec * 8 / 1000);
}
}
} else if (formattype == FORMAT_VorbisFormat) {
VORBISFORMAT* vf = (VORBISFORMAT*)Format();
codec = GetAudioCodecName(subtype, 0);
- dim.Format(_T("%dHz"), vf->nSamplesPerSec);
+ dim.Format(_T("%uHz"), vf->nSamplesPerSec);
if (vf->nChannels == 1) {
dim += _T(" mono");
} else if (vf->nChannels == 2) {
dim += _T(" stereo");
} else {
- dim.AppendFormat(_T(" %dch"), vf->nChannels);
+ dim.AppendFormat(_T(" %uch"), vf->nChannels);
}
if (vf->nAvgBitsPerSec) {
- rate.Format(_T("%dkbps"), vf->nAvgBitsPerSec / 1000);
+ rate.Format(_T("%ukbps"), vf->nAvgBitsPerSec / 1000);
}
} else if (formattype == FORMAT_VorbisFormat2) {
VORBISFORMAT2* vf = (VORBISFORMAT2*)Format();
codec = GetAudioCodecName(subtype, 0);
- dim.Format(_T("%dHz"), vf->SamplesPerSec);
+ dim.Format(_T("%uHz"), vf->SamplesPerSec);
if (vf->Channels == 1) {
dim += _T(" mono");
} else if (vf->Channels == 2) {
dim += _T(" stereo");
} else {
- dim.AppendFormat(_T(" %dch"), vf->Channels);
+ dim.AppendFormat(_T(" %uch"), vf->Channels);
}
}
} else if (majortype == MEDIATYPE_Text) {
@@ -271,7 +271,7 @@ CString CMediaTypeEx::GetVideoCodecName(const GUID& subtype, DWORD biCompression
}
// else if (subtype == ) str = _T("");
else if (biCompression < 256) {
- str.Format(_T("%d"), biCompression);
+ str.Format(_T("%u"), biCompression);
} else {
str.Format(_T("%4.4hs"), &biCompression);
}
@@ -470,9 +470,9 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
sl.AddTail(str);
str.Format(_T("bTemporalCompression: %d"), bTemporalCompression);
sl.AddTail(str);
- str.Format(_T("lSampleSize: %d"), lSampleSize);
+ str.Format(_T("lSampleSize: %u"), lSampleSize);
sl.AddTail(str);
- str.Format(_T("cbFormat: %d"), cbFormat);
+ str.Format(_T("cbFormat: %u"), cbFormat);
sl.AddTail(str);
sl.AddTail(_T(""));
@@ -494,9 +494,9 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
sl.AddTail(str);
str.Format(_T("rcTarget: (%d,%d)-(%d,%d)"), vih.rcTarget.left, vih.rcTarget.top, vih.rcTarget.right, vih.rcTarget.bottom);
sl.AddTail(str);
- str.Format(_T("dwBitRate: %d"), vih.dwBitRate);
+ str.Format(_T("dwBitRate: %u"), vih.dwBitRate);
sl.AddTail(str);
- str.Format(_T("dwBitErrorRate: %d"), vih.dwBitErrorRate);
+ str.Format(_T("dwBitErrorRate: %u"), vih.dwBitErrorRate);
sl.AddTail(str);
str.Format(_T("AvgTimePerFrame: %I64d"), vih.AvgTimePerFrame);
sl.AddTail(str);
@@ -512,9 +512,9 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
sl.AddTail(str);
str.Format(_T("dwCopyProtectFlags: 0x%08x"), vih2.dwCopyProtectFlags);
sl.AddTail(str);
- str.Format(_T("dwPictAspectRatioX: %d"), vih2.dwPictAspectRatioX);
+ str.Format(_T("dwPictAspectRatioX: %u"), vih2.dwPictAspectRatioX);
sl.AddTail(str);
- str.Format(_T("dwPictAspectRatioY: %d"), vih2.dwPictAspectRatioY);
+ str.Format(_T("dwPictAspectRatioY: %u"), vih2.dwPictAspectRatioY);
sl.AddTail(str);
str.Format(_T("dwControlFlags: 0x%08x"), vih2.dwControlFlags);
sl.AddTail(str);
@@ -528,9 +528,9 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
MPEG1VIDEOINFO& mvih = *(MPEG1VIDEOINFO*)pbFormat;
sl.AddTail(_T("MPEG1VIDEOINFO:"));
- str.Format(_T("dwStartTimeCode: %d"), mvih.dwStartTimeCode);
+ str.Format(_T("dwStartTimeCode: %u"), mvih.dwStartTimeCode);
sl.AddTail(str);
- str.Format(_T("cbSequenceHeader: %d"), mvih.cbSequenceHeader);
+ str.Format(_T("cbSequenceHeader: %u"), mvih.cbSequenceHeader);
sl.AddTail(str);
sl.AddTail(_T(""));
@@ -538,9 +538,9 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
MPEG2VIDEOINFO& mvih = *(MPEG2VIDEOINFO*)pbFormat;
sl.AddTail(_T("MPEG2VIDEOINFO:"));
- str.Format(_T("dwStartTimeCode: %d"), mvih.dwStartTimeCode);
+ str.Format(_T("dwStartTimeCode: %u"), mvih.dwStartTimeCode);
sl.AddTail(str);
- str.Format(_T("cbSequenceHeader: %d"), mvih.cbSequenceHeader);
+ str.Format(_T("cbSequenceHeader: %u"), mvih.cbSequenceHeader);
sl.AddTail(str);
str.Format(_T("dwProfile: 0x%08x"), mvih.dwProfile);
sl.AddTail(str);
@@ -553,31 +553,31 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
}
sl.AddTail(_T("BITMAPINFOHEADER:"));
- str.Format(_T("biSize: %d"), bih->biSize);
+ str.Format(_T("biSize: %u"), bih->biSize);
sl.AddTail(str);
str.Format(_T("biWidth: %d"), bih->biWidth);
sl.AddTail(str);
str.Format(_T("biHeight: %d"), bih->biHeight);
sl.AddTail(str);
- str.Format(_T("biPlanes: %d"), bih->biPlanes);
+ str.Format(_T("biPlanes: %u"), bih->biPlanes);
sl.AddTail(str);
- str.Format(_T("biBitCount: %d"), bih->biBitCount);
+ str.Format(_T("biBitCount: %u"), bih->biBitCount);
sl.AddTail(str);
if (bih->biCompression < 256) {
- str.Format(_T("biCompression: %d"), bih->biCompression);
+ str.Format(_T("biCompression: %u"), bih->biCompression);
} else {
str.Format(_T("biCompression: %4.4hs"), &bih->biCompression);
}
sl.AddTail(str);
- str.Format(_T("biSizeImage: %d"), bih->biSizeImage);
+ str.Format(_T("biSizeImage: %u"), bih->biSizeImage);
sl.AddTail(str);
str.Format(_T("biXPelsPerMeter: %d"), bih->biXPelsPerMeter);
sl.AddTail(str);
str.Format(_T("biYPelsPerMeter: %d"), bih->biYPelsPerMeter);
sl.AddTail(str);
- str.Format(_T("biClrUsed: %d"), bih->biClrUsed);
+ str.Format(_T("biClrUsed: %u"), bih->biClrUsed);
sl.AddTail(str);
- str.Format(_T("biClrImportant: %d"), bih->biClrImportant);
+ str.Format(_T("biClrImportant: %u"), bih->biClrImportant);
sl.AddTail(str);
sl.AddTail(_T(""));
@@ -603,17 +603,17 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
sl.AddTail(_T("WAVEFORMATEX:"));
str.Format(_T("wFormatTag: 0x%04x"), wfe.wFormatTag);
sl.AddTail(str);
- str.Format(_T("nChannels: %d"), wfe.nChannels);
+ str.Format(_T("nChannels: %u"), wfe.nChannels);
sl.AddTail(str);
- str.Format(_T("nSamplesPerSec: %d"), wfe.nSamplesPerSec);
+ str.Format(_T("nSamplesPerSec: %u"), wfe.nSamplesPerSec);
sl.AddTail(str);
- str.Format(_T("nAvgBytesPerSec: %d"), wfe.nAvgBytesPerSec);
+ str.Format(_T("nAvgBytesPerSec: %u"), wfe.nAvgBytesPerSec);
sl.AddTail(str);
- str.Format(_T("nBlockAlign: %d"), wfe.nBlockAlign);
+ str.Format(_T("nBlockAlign: %u"), wfe.nBlockAlign);
sl.AddTail(str);
- str.Format(_T("wBitsPerSample: %d"), wfe.wBitsPerSample);
+ str.Format(_T("wBitsPerSample: %u"), wfe.wBitsPerSample);
sl.AddTail(str);
- str.Format(_T("cbSize: %d (extra bytes)"), wfe.cbSize);
+ str.Format(_T("cbSize: %u (extra bytes)"), wfe.cbSize);
sl.AddTail(str);
sl.AddTail(_T(""));
@@ -626,9 +626,9 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
sl.AddTail(_T("WAVEFORMATEXTENSIBLE:"));
if (wfe.Format.wBitsPerSample != 0) {
- str.Format(_T("wValidBitsPerSample: %d"), wfe.Samples.wValidBitsPerSample);
+ str.Format(_T("wValidBitsPerSample: %u"), wfe.Samples.wValidBitsPerSample);
} else {
- str.Format(_T("wSamplesPerBlock: %d"), wfe.Samples.wSamplesPerBlock);
+ str.Format(_T("wSamplesPerBlock: %u"), wfe.Samples.wSamplesPerBlock);
}
sl.AddTail(str);
str.Format(_T("dwChannelMask: 0x%08x"), wfe.dwChannelMask);
@@ -643,15 +643,15 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
DOLBYAC3WAVEFORMAT& wfe = *(DOLBYAC3WAVEFORMAT*)pbFormat;
sl.AddTail(_T("DOLBYAC3WAVEFORMAT:"));
- str.Format(_T("bBigEndian: %d"), wfe.bBigEndian);
+ str.Format(_T("bBigEndian: %u"), wfe.bBigEndian);
sl.AddTail(str);
- str.Format(_T("bsid: %d"), wfe.bsid);
+ str.Format(_T("bsid: %u"), wfe.bsid);
sl.AddTail(str);
- str.Format(_T("lfeon: %d"), wfe.lfeon);
+ str.Format(_T("lfeon: %u"), wfe.lfeon);
sl.AddTail(str);
- str.Format(_T("copyrightb: %d"), wfe.copyrightb);
+ str.Format(_T("copyrightb: %u"), wfe.copyrightb);
sl.AddTail(str);
- str.Format(_T("nAuxBitsCode: %d"), wfe.nAuxBitsCode);
+ str.Format(_T("nAuxBitsCode: %u"), wfe.nAuxBitsCode);
sl.AddTail(str);
sl.AddTail(_T(""));
@@ -663,15 +663,15 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
VORBISFORMAT& vf = *(VORBISFORMAT*)pbFormat;
sl.AddTail(_T("VORBISFORMAT:"));
- str.Format(_T("nChannels: %d"), vf.nChannels);
+ str.Format(_T("nChannels: %u"), vf.nChannels);
sl.AddTail(str);
- str.Format(_T("nSamplesPerSec: %d"), vf.nSamplesPerSec);
+ str.Format(_T("nSamplesPerSec: %u"), vf.nSamplesPerSec);
sl.AddTail(str);
- str.Format(_T("nMinBitsPerSec: %d"), vf.nMinBitsPerSec);
+ str.Format(_T("nMinBitsPerSec: %u"), vf.nMinBitsPerSec);
sl.AddTail(str);
- str.Format(_T("nAvgBitsPerSec: %d"), vf.nAvgBitsPerSec);
+ str.Format(_T("nAvgBitsPerSec: %u"), vf.nAvgBitsPerSec);
sl.AddTail(str);
- str.Format(_T("nMaxBitsPerSec: %d"), vf.nMaxBitsPerSec);
+ str.Format(_T("nMaxBitsPerSec: %u"), vf.nMaxBitsPerSec);
sl.AddTail(str);
str.Format(_T("fQuality: %.3f"), vf.fQuality);
sl.AddTail(str);
@@ -683,13 +683,13 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
VORBISFORMAT2& vf = *(VORBISFORMAT2*)pbFormat;
sl.AddTail(_T("VORBISFORMAT:"));
- str.Format(_T("Channels: %d"), vf.Channels);
+ str.Format(_T("Channels: %u"), vf.Channels);
sl.AddTail(str);
- str.Format(_T("SamplesPerSec: %d"), vf.SamplesPerSec);
+ str.Format(_T("SamplesPerSec: %u"), vf.SamplesPerSec);
sl.AddTail(str);
- str.Format(_T("BitsPerSample: %d"), vf.BitsPerSample);
+ str.Format(_T("BitsPerSample: %u"), vf.BitsPerSample);
sl.AddTail(str);
- str.Format(_T("HeaderSize: {%d, %d, %d}"), vf.HeaderSize[0], vf.HeaderSize[1], vf.HeaderSize[2]);
+ str.Format(_T("HeaderSize: {%u, %u, %u}"), vf.HeaderSize[0], vf.HeaderSize[1], vf.HeaderSize[2]);
sl.AddTail(str);
sl.AddTail(_T(""));
@@ -699,7 +699,7 @@ void CMediaTypeEx::Dump(CAtlList<CString>& sl)
SUBTITLEINFO& si = *(SUBTITLEINFO*)pbFormat;
sl.AddTail(_T("SUBTITLEINFO:"));
- str.Format(_T("dwOffset: %d"), si.dwOffset);
+ str.Format(_T("dwOffset: %u"), si.dwOffset);
sl.AddTail(str);
str.Format(_T("IsoLang: %s"), CString(CStringA(si.IsoLang, sizeof(si.IsoLang) - 1)));
sl.AddTail(str);
diff --git a/src/Subtitles/STS.cpp b/src/Subtitles/STS.cpp
index ce1866139..49b011e0f 100644
--- a/src/Subtitles/STS.cpp
+++ b/src/Subtitles/STS.cpp
@@ -3020,7 +3020,7 @@ LOGFONTW& operator <<= (LOGFONTW& lfw, STSStyle& s)
CString& operator <<= (CString& style, STSStyle& s)
{
- style.Format(_T("%d;%d;%d;%d;%d;%d;%f;%f;%f;%f;0x%06x;0x%06x;0x%06x;0x%06x;0x%02x;0x%02x;0x%02x;0x%02x;%d;%s;%f;%f;%f;%f;%d;%d;%d;%d;%d;%f;%f;%f;%f;%d"),
+ style.Format(_T("%d;%d;%d;%d;%d;%d;%f;%f;%f;%f;0x%06x;0x%06x;0x%06x;0x%06x;0x%02x;0x%02x;0x%02x;0x%02x;%d;%s;%f;%f;%f;%f;%d;%u;%u;%u;%d;%f;%f;%f;%f;%d"),
s.marginRect.left, s.marginRect.right, s.marginRect.top, s.marginRect.bottom,
s.scrAlignment, s.borderStyle,
s.outlineWidthX, s.outlineWidthY, s.shadowDepthX, s.shadowDepthY,
diff --git a/src/Subtitles/USFSubtitles.cpp b/src/Subtitles/USFSubtitles.cpp
index f6841fa0a..6ac0d5a31 100644
--- a/src/Subtitles/USFSubtitles.cpp
+++ b/src/Subtitles/USFSubtitles.cpp
@@ -749,9 +749,9 @@ void CUSFSubtitles::ParseText(CComPtr<IXMLDOMNode> pNode, CStringW& str)
for (size_t i = 0; i < 4; i++) {
if (!fs.color[i].IsEmpty()) {
CStringW s;
- s.Format(L"{\\%dc&H%06x&}", i + 1, ColorToDWORD(fs.color[i]));
+ s.Format(L"{\\%uc&H%06x&}", i + 1, ColorToDWORD(fs.color[i]));
prefix += s;
- s.Format(L"{\\%dc}", i + 1);
+ s.Format(L"{\\%uc}", i + 1);
postfix += s;
}
}
diff --git a/src/Subtitles/VobSubFile.cpp b/src/Subtitles/VobSubFile.cpp
index 87e102e79..b34b63b45 100644
--- a/src/Subtitles/VobSubFile.cpp
+++ b/src/Subtitles/VobSubFile.cpp
@@ -972,7 +972,7 @@ bool CVobSubFile::WriteIdx(CString fn, int delay)
f.WriteString(_T("# For correcting non-progressive desync. (in millisecs or hh:mm:ss:ms)\n"));
f.WriteString(_T("# Note: Not effective in DirectVobSub, use \"delay: ... \" instead.\n"));
- str.Format(_T("time offset: %d\n\n"), m_toff);
+ str.Format(_T("time offset: %u\n\n"), m_toff);
f.WriteString(str);
f.WriteString(_T("# ON: displays only forced subtitles, OFF: shows everything\n"));
@@ -1042,7 +1042,7 @@ bool CVobSubFile::WriteIdx(CString fn, int delay)
if (!sl.id) {
sl.id = '--';
}
- str.Format(_T("id: %c%c, index: %d\n"), sl.id >> 8, sl.id & 0xff, i);
+ str.Format(_T("id: %c%c, index: %u\n"), sl.id >> 8, sl.id & 0xff, i);
f.WriteString(str);
str = _T("# Uncomment next line to activate alternative name in DirectVobSub / Windows Media Player 6.x\n");
@@ -1775,7 +1775,7 @@ bool CVobSubFile::SaveWinSubMux(CString fn, int delay)
}
CString bmpfn;
- bmpfn.Format(_T("%s_%06d.bmp"), fn, i + 1);
+ bmpfn.Format(_T("%s_%06u.bmp"), fn, i + 1);
CString str;
str.Format(_T("%s\t%02d:%02d:%02d:%02d %02d:%02d:%02d:%02d\t%03d %03d %03d %03d %d %d %d %d\n"),
@@ -1968,7 +1968,7 @@ bool CVobSubFile::SaveScenarist(CString fn, int delay)
}
CString bmpfn;
- bmpfn.Format(_T("%s_%04d.bmp"), fn, i + 1);
+ bmpfn.Format(_T("%s_%04u.bmp"), fn, i + 1);
title = bmpfn.Mid(bmpfn.ReverseFind('/') + 1);
// E1, E2, P, Bg
@@ -2050,7 +2050,7 @@ bool CVobSubFile::SaveScenarist(CString fn, int delay)
continue;
}
- str.Format(_T("%04d\t%02d:%02d:%02d:%02d\t%02d:%02d:%02d:%02d\t%s\n"),
+ str.Format(_T("%04u\t%02d:%02d:%02d:%02d\t%02d:%02d:%02d:%02d\t%s\n"),
++k,
h1, m1, s1, f1,
h2, m2, s2, f2,
@@ -2198,7 +2198,7 @@ bool CVobSubFile::SaveMaestro(CString fn, int delay)
}
CString bmpfn;
- bmpfn.Format(_T("%s_%04d.bmp"), fn, i + 1);
+ bmpfn.Format(_T("%s_%04u.bmp"), fn, i + 1);
title = bmpfn.Mid(bmpfn.ReverseFind('/') + 1);
// E1, E2, P, Bg
@@ -2278,7 +2278,7 @@ bool CVobSubFile::SaveMaestro(CString fn, int delay)
continue;
}
- str.Format(_T("%04d\t%02d:%02d:%02d:%02d\t%02d:%02d:%02d:%02d\t%s\n"),
+ str.Format(_T("%04u\t%02d:%02d:%02d:%02d\t%02d:%02d:%02d:%02d\t%s\n"),
++k,
h1, m1, s1, f1,
h2, m2, s2, f2,
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxer.cpp b/src/filters/muxer/BaseMuxer/BaseMuxer.cpp
index 1a410f270..51701539d 100644
--- a/src/filters/muxer/BaseMuxer/BaseMuxer.cpp
+++ b/src/filters/muxer/BaseMuxer/BaseMuxer.cpp
@@ -71,7 +71,7 @@ void CBaseMuxerFilter::AddInput()
CStringW name;
- name.Format(L"Input %d", m_pInputs.GetCount() + 1);
+ name.Format(L"Input %u", m_pInputs.GetCount() + 1);
CBaseMuxerInputPin* pInputPin = nullptr;
if (FAILED(CreateInput(name, &pInputPin)) || !pInputPin) {
@@ -80,7 +80,7 @@ void CBaseMuxerFilter::AddInput()
}
CAutoPtr<CBaseMuxerInputPin> pAutoPtrInputPin(pInputPin);
- name.Format(L"~Output %d", m_pRawOutputs.GetCount() + 1);
+ name.Format(L"~Output %u", m_pRawOutputs.GetCount() + 1);
CBaseMuxerRawOutputPin* pRawOutputPin = nullptr;
if (FAILED(CreateRawOutput(name, &pRawOutputPin)) || !pRawOutputPin) {
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp b/src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp
index 3a8fe8ef6..59439a7aa 100644
--- a/src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp
+++ b/src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp
@@ -296,7 +296,7 @@ void CBaseMuxerRawOutputPin::MuxPacket(const CMediaType& mt, const MuxerPacket*
DVD_HMSF_TIMECODE start = RT2HMSF(pPacket->rtStart, 25);
DVD_HMSF_TIMECODE stop = RT2HMSF(pPacket->rtStop, 25);
- str.Format("%d\n%02d:%02d:%02d,%03d --> %02d:%02d:%02d,%03d\n%s\n\n",
+ str.Format("%d\n%02u:%02u:%02u,%03d --> %02u:%02u:%02u,%03d\n%s\n\n",
pPacket->index + 1,
start.bHours, start.bMinutes, start.bSeconds, (int)((pPacket->rtStart / 10000) % 1000),
stop.bHours, stop.bMinutes, stop.bSeconds, (int)((pPacket->rtStop / 10000) % 1000),
@@ -340,7 +340,7 @@ void CBaseMuxerRawOutputPin::MuxPacket(const CMediaType& mt, const MuxerPacket*
layer = "Marked=0";
}
- str.Format("Dialogue: %s,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,%s,%s,%s,%s,%s,%s,%s\n",
+ str.Format("Dialogue: %s,%u:%02u:%02u.%02d,%u:%02u:%02u.%02d,%s,%s,%s,%s,%s,%s,%s\n",
layer,
start.bHours, start.bMinutes, start.bSeconds, (int)((pPacket->rtStart / 100000) % 100),
stop.bHours, stop.bMinutes, stop.bSeconds, (int)((pPacket->rtStop / 100000) % 100),
@@ -473,7 +473,7 @@ void CBaseMuxerRawOutputPin::MuxFooter(const CMediaType& mt)
while (pos) {
const idx_t& i = m_idx.GetNext(pos);
DVD_HMSF_TIMECODE start = RT2HMSF(i.rt, 25);
- _ftprintf_s(f, _T("timestamp: %02d:%02d:%02d:%03d, filepos: %09I64x\n"),
+ _ftprintf_s(f, _T("timestamp: %02u:%02u:%02u:%03d, filepos: %09I64x\n"),
start.bHours, start.bMinutes, start.bSeconds, (int)((i.rt / 10000) % 1000),
i.fp);
}
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
index 36065d959..ad244a096 100644
--- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
+++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
@@ -133,7 +133,7 @@ void CMatroskaMuxerFilter::AddInput()
}
CStringW name;
- name.Format(L"Track %d", m_pInputs.GetCount() + 1);
+ name.Format(L"Track %u", m_pInputs.GetCount() + 1);
HRESULT hr;
CAutoPtr<CMatroskaMuxerInputPin> pPin(DEBUG_NEW CMatroskaMuxerInputPin(name, this, this, &hr));
diff --git a/src/filters/parser/DSMSplitter/DSMSplitter.cpp b/src/filters/parser/DSMSplitter/DSMSplitter.cpp
index 573b7b595..fa8e9b458 100644
--- a/src/filters/parser/DSMSplitter/DSMSplitter.cpp
+++ b/src/filters/parser/DSMSplitter/DSMSplitter.cpp
@@ -151,7 +151,7 @@ HRESULT CDSMSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
CMediaType& mt = m_pFile->m_mts[id];
CStringW name, lang;
- name.Format(L"Output %02d", id);
+ name.Format(L"Output %02u", id);
CAtlArray<CMediaType> mts;
mts.Add(mt);
diff --git a/src/filters/parser/MP4Splitter/MP4Splitter.cpp b/src/filters/parser/MP4Splitter/MP4Splitter.cpp
index bdf2b0991..5d896373e 100644
--- a/src/filters/parser/MP4Splitter/MP4Splitter.cpp
+++ b/src/filters/parser/MP4Splitter/MP4Splitter.cpp
@@ -174,7 +174,7 @@ static CStringW ConvertTX3GToSSA(
str.Format(L"%s{\\2c%02x%02x%02x\\2a%02x}", CString(str), fclr[2], fclr[1], fclr[0], 255 - fclr[3]);
CStringW font_size;
- font_size.Format(L"{\\fs%d}", desc.Style.Font.Size);
+ font_size.Format(L"{\\fs%u}", desc.Style.Font.Size);
str = font_size + str;
CStringW font_flags;
@@ -227,7 +227,7 @@ static CStringW ConvertTX3GToSSA(
chars[start].pre += s;
chars[end - 1].post += font_color;
- s.Format(L"{\\fs%d}", size);
+ s.Format(L"{\\fs%u}", size);
chars[start].pre += s;
chars[end - 1].post += font_size;
@@ -309,7 +309,7 @@ static CStringW ConvertTX3GToSSA(
if (start < end) {
CStringW s;
- s.Format(L"{\\kt%d\\kf%d}", start_time / 10, (end_time - start_time) / 10);
+ s.Format(L"{\\kt%u\\kf%u}", start_time / 10, (end_time - start_time) / 10);
chars[start].pre += s;
s.Format(L"{\\1c%02x%02x%02x\\1a%02x}", hclr[2], hclr[1], hclr[0], 255 - hclr[3]);
chars[start].pre += s;
@@ -1202,7 +1202,7 @@ HRESULT CMP4SplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
DWORD id = track->GetId();
CStringW name, lang;
- name.Format(L"Output %d", id);
+ name.Format(L"Output %u", id);
if (!TrackName.IsEmpty()) {
name = TrackName;
@@ -1283,9 +1283,9 @@ HRESULT CMP4SplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
if (db->GetDataSize() >= 4) {
unsigned short n = (db->GetData()[2] << 8) | db->GetData()[3];
if (n > 0 && n < 100) {
- track.Format(L"%02d", n);
+ track.Format(L"%02u", n);
} else if (n >= 100) {
- track.Format(L"%d", n);
+ track.Format(L"%u", n);
}
}
} else {
diff --git a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp
index ff757bf0a..f95fb9be5 100644
--- a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp
+++ b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp
@@ -165,7 +165,7 @@ HRESULT CMatroskaSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
CStringA CodecID = pTE->CodecID.ToString();
CStringW Name;
- Name.Format(L"Output %I64d", (UINT64)pTE->TrackNumber);
+ Name.Format(L"Output %I64u", (UINT64)pTE->TrackNumber);
CMediaType mt;
CAtlArray<CMediaType> mts;
diff --git a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp
index 7e9252f97..30e524d71 100644
--- a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp
+++ b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp
@@ -245,7 +245,7 @@ HRESULT CRealMediaSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
MediaProperies* pmp = m_pFile->m_mps.GetNext(pos);
CStringW name;
- name.Format(L"Output %02d", pmp->stream);
+ name.Format(L"Output %02u", pmp->stream);
if (!pmp->name.IsEmpty()) {
name += L" (" + CStringW(pmp->name) + L")";
}
@@ -529,7 +529,7 @@ HRESULT CRealMediaSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
CRMFile::subtitle& s = m_pFile->m_subs.GetNext(pos);
CStringW name;
- name.Format(L"Subtitle %02d", stream);
+ name.Format(L"Subtitle %02u", stream);
if (!s.name.IsEmpty()) {
name += L" (" + CStringW(CString(s.name)) + L")";
}
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
index 3e707fd56..00ab93be3 100644
--- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
@@ -1868,7 +1868,7 @@ void CDX9AllocatorPresenter::DrawStats()
OffsetRect(&rc, 0, TextHeight);
if (m_bIsEVR) {
- strText.Format(L"Refresh rate : %.05f Hz SL: %4d (%3d Hz) Last Duration: %10.6f Corrected Frame Time: %s", m_DetectedRefreshRate, int(m_DetectedScanlinesPerFrame + 0.5), m_RefreshRate, double(m_LastFrameDuration) / 10000.0, m_bCorrectedFrameTime ? L"Yes" : L"No");
+ strText.Format(L"Refresh rate : %.05f Hz SL: %4d (%3u Hz) Last Duration: %10.6f Corrected Frame Time: %s", m_DetectedRefreshRate, int(m_DetectedScanlinesPerFrame + 0.5), m_RefreshRate, double(m_LastFrameDuration) / 10000.0, m_bCorrectedFrameTime ? L"Yes" : L"No");
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
}
@@ -1990,7 +1990,7 @@ void CDX9AllocatorPresenter::DrawStats()
}
if (desc.Width != (UINT)m_NativeVideoSize.cx || desc.Height != (UINT)m_NativeVideoSize.cy) {
- strText.Format(L"Texture size : %d x %d", desc.Width, desc.Height);
+ strText.Format(L"Texture size : %u x %u", desc.Width, desc.Height);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
}
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
index ddd92b58e..36bd9dd87 100644
--- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
+++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
@@ -1985,7 +1985,7 @@ void CBaseAP::DrawStats()
CString strText;
int TextHeight = (int)(25.0 * m_TextScale + 0.5);
- strText.Format(L"Frames drawn from stream start: %d | Sample time stamp: %d ms", m_pcFramesDrawn, (LONG)(m_llSampleTime / 10000));
+ strText.Format(L"Frames drawn from stream start: %u | Sample time stamp: %d ms", m_pcFramesDrawn, (LONG)(m_llSampleTime / 10000));
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
@@ -2002,7 +2002,7 @@ void CBaseAP::DrawStats()
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"Windows : Display cycle %.3f ms Display refresh rate %d Hz", m_dD3DRefreshCycle, m_uD3DRefreshRate);
+ strText.Format(L"Windows : Display cycle %.3f ms Display refresh rate %u Hz", m_dD3DRefreshCycle, m_uD3DRefreshRate);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
@@ -2062,7 +2062,7 @@ void CBaseAP::DrawStats()
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
} else {
- strText.Format(L"Sync adjust : %d | # of adjustments: %d", m_pGenlock->adjDelta, (m_pGenlock->clockAdjustmentsMade + m_pGenlock->displayAdjustmentsMade) / 2);
+ strText.Format(L"Sync adjust : %d | # of adjustments: %u", m_pGenlock->adjDelta, (m_pGenlock->clockAdjustmentsMade + m_pGenlock->displayAdjustmentsMade) / 2);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
}
@@ -2073,13 +2073,13 @@ void CBaseAP::DrawStats()
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"Sync status : glitches %d, display-frame cycle mismatch: %7.3f %%, dropped frames %d", m_uSyncGlitches, 100 * m_dCycleDifference, m_pcFramesDropped);
+ strText.Format(L"Sync status : glitches %u, display-frame cycle mismatch: %7.3f %%, dropped frames %u", m_uSyncGlitches, 100 * m_dCycleDifference, m_pcFramesDropped);
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
if (pApp->m_fDisplayStats == 1) {
if (m_pAudioStats && r.m_AdvRendSets.bSynchronizeVideo) {
- strText.Format(L"Audio lag : %3d ms [%d ms, %d ms] | %s", m_lAudioLag, m_lAudioLagMin, m_lAudioLagMax, (m_lAudioSlaveMode == 4) ? _T("Audio renderer is matching rate (for analog sound output)") : _T("Audio renderer is not matching rate"));
+ strText.Format(L"Audio lag : %3u ms [%d ms, %d ms] | %s", m_lAudioLag, m_lAudioLagMin, m_lAudioLagMax, (m_lAudioSlaveMode == 4) ? _T("Audio renderer is matching rate (for analog sound output)") : _T("Audio renderer is not matching rate"));
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
}
@@ -4260,7 +4260,7 @@ HRESULT CGenlock::GetTiming()
// The display update frequency is controlled by adding and subtracting pixels form the
// image. This is done by either subtracting columns or rows or both. Some displays like
// row adjustments and some column adjustments. One should probably not do both.
- StringCchPrintf(faster, MAX_LOADSTRING, _T("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\0"),
+ StringCchPrintf(faster, MAX_LOADSTRING, _T("%u,%u,%u,%u,%u,%u,%u,%u,%u,%u\0"),
displayTiming[0],
displayTiming[HFRONTPORCH] - columnDelta,
displayTiming[2],
@@ -4274,7 +4274,7 @@ HRESULT CGenlock::GetTiming()
);
// Nominal update frequency
- StringCchPrintf(cruise, MAX_LOADSTRING, _T("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\0"),
+ StringCchPrintf(cruise, MAX_LOADSTRING, _T("%u,%u,%u,%u,%u,%u,%u,%u,%u,%u\0"),
displayTiming[0],
displayTiming[HFRONTPORCH],
displayTiming[2],
@@ -4288,7 +4288,7 @@ HRESULT CGenlock::GetTiming()
);
// Lower than nominal update frequency
- StringCchPrintf(slower, MAX_LOADSTRING, _T("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\0"),
+ StringCchPrintf(slower, MAX_LOADSTRING, _T("%u,%u,%u,%u,%u,%u,%u,%u,%u,%u\0"),
displayTiming[0],
displayTiming[HFRONTPORCH] + columnDelta,
displayTiming[2],
diff --git a/src/filters/source/D2VSource/MPEG2Dec.cpp b/src/filters/source/D2VSource/MPEG2Dec.cpp
index e1df991b8..5154e53a3 100644
--- a/src/filters/source/D2VSource/MPEG2Dec.cpp
+++ b/src/filters/source/D2VSource/MPEG2Dec.cpp
@@ -3811,7 +3811,7 @@ int CMPEG2Dec::Open(LPCTSTR path, DstFormat dstFormat)
i = File_Limit;
while (i)
{
- if(1 != fscanf_s(out->VF_File, "%d ", &j)) {
+ if(1 != fscanf_s(out->VF_File, "%u ", &j)) {
File_Limit = File_Limit - i;
return 0;
}
@@ -3899,7 +3899,7 @@ int CMPEG2Dec::Open(LPCTSTR path, DstFormat dstFormat)
auxframe[i] = DEBUG_NEW unsigned char[size];
}
- if(1 != sscanf_s(myfgets(buffer, sizeof(buffer), out->VF_File), "YUVRGB_Scale=%d\n", &i))
+ if(1 != sscanf_s(myfgets(buffer, sizeof(buffer), out->VF_File), "YUVRGB_Scale=%u\n", &i))
return 0;
if (i)
@@ -3920,9 +3920,9 @@ int CMPEG2Dec::Open(LPCTSTR path, DstFormat dstFormat)
}
char* tmp = myfgets(buffer, sizeof(buffer), out->VF_File);
- if(2 != sscanf_s(tmp, "Luminance=%d,%d\n", &i, &j))
+ if(2 != sscanf_s(tmp, "Luminance=%u,%u\n", &i, &j))
{
- if(2 != sscanf_s(tmp, "Luminance_Filter=%d,%d\n", &i, &j))
+ if(2 != sscanf_s(tmp, "Luminance_Filter=%u,%u\n", &i, &j))
return 0;
i=128; j=0;
}
@@ -3985,12 +3985,12 @@ int CMPEG2Dec::Open(LPCTSTR path, DstFormat dstFormat)
return 0;
if(1 != sscanf_s(myfgets(buffer, sizeof(buffer), out->VF_File), "Frame_Rate=%d\n", &(out->VF_FrameRate)))
return 0;
- if(4 != sscanf_s(myfgets(buffer, sizeof(buffer), out->VF_File), "Location=%d,%X,%d,%X\n", &i, &j, &i, &j))
+ if(4 != sscanf_s(myfgets(buffer, sizeof(buffer), out->VF_File), "Location=%u,%X,%u,%X\n", &i, &j, &i, &j))
return 0;
ntsc = film = top = bottom = gop = mapping = repeat_on = repeat_off = repeat_init = 0;
- while (1 == fscanf_s(out->VF_File, "%d", &type) && type<9)
+ while (1 == fscanf_s(out->VF_File, "%u", &type) && type<9)
{
if (type==7) // I frame
{
@@ -4002,7 +4002,7 @@ int CMPEG2Dec::Open(LPCTSTR path, DstFormat dstFormat)
GOPList[gop]->position = (__int64)j*BUFFER_SIZE;
gop ++;
- if(1 != fscanf_s(out->VF_File, "%d", &j))
+ if(1 != fscanf_s(out->VF_File, "%u", &j))
break;
tff = j>>1;
diff --git a/src/filters/source/FLACSource/FLACSource.cpp b/src/filters/source/FLACSource/FLACSource.cpp
index a8bf5ac46..b833f573f 100644
--- a/src/filters/source/FLACSource/FLACSource.cpp
+++ b/src/filters/source/FLACSource/FLACSource.cpp
@@ -386,13 +386,13 @@ void CFLACStream::UpdateFromMetadata(void* pBuffer)
}
rt = MILLISECONDS_TO_100NS_UNITS(1000 * track.offset / m_nSamplesPerSec);
- s.Format(_T("Track %02d"), i + 1);
+ s.Format(_T("Track %02u"), i + 1);
((CFLACSource*)m_pFilter)->ChapAppend(rt, s);
if (track.num_indices > 1) {
for (int j = 0; j < track.num_indices; ++j) {
FLAC__StreamMetadata_CueSheet_Index& index = track.indices[j];
- s.Format(_T("+ INDEX %02d"), index.number);
+ s.Format(_T("+ INDEX %02u"), index.number);
REFERENCE_TIME r = rt + MILLISECONDS_TO_100NS_UNITS(1000 * index.offset / m_nSamplesPerSec);
((CFLACSource*)m_pFilter)->ChapAppend(r, s);
}
diff --git a/src/filters/source/ShoutcastSource/ShoutcastSource.cpp b/src/filters/source/ShoutcastSource/ShoutcastSource.cpp
index 322667c6b..04df8b747 100644
--- a/src/filters/source/ShoutcastSource/ShoutcastSource.cpp
+++ b/src/filters/source/ShoutcastSource/ShoutcastSource.cpp
@@ -659,7 +659,7 @@ bool CShoutcastStream::CShoutcastSocket::Connect(CUrl& url)
str.MakeLower();
if (str.Find("icy 200 ok") >= 0) {
fOK = true;
- } else if (1 == sscanf_s(str, "icy-br:%d", &m_bitrate)) {
+ } else if (1 == sscanf_s(str, "icy-br:%u", &m_bitrate)) {
m_bitrate *= 1000;
} else if (1 == sscanf_s(str, "icy-metaint:%d", &metaint)) {
m_metaint = metaint;
diff --git a/src/mpc-hc/AppSettings.cpp b/src/mpc-hc/AppSettings.cpp
index bba802387..c3808485a 100644
--- a/src/mpc-hc/AppSettings.cpp
+++ b/src/mpc-hc/AppSettings.cpp
@@ -717,7 +717,7 @@ void CAppSettings::SaveSettings()
CString str;
str.Format(_T("CommandMod%d"), i);
CString str2;
- str2.Format(_T("%d %x %x %s %d %u %u %u"),
+ str2.Format(_T("%u %x %x %s %d %u %u %u"),
wc.cmd, wc.fVirt, wc.key,
_T("\"") + CString(wc.rmcmd) + _T("\""), wc.rmrepcnt,
wc.mouse, wc.appcmd, wc.mouseFS);
diff --git a/src/mpc-hc/DVBChannel.cpp b/src/mpc-hc/DVBChannel.cpp
index 9a6ee95ae..5a6b2c26a 100644
--- a/src/mpc-hc/DVBChannel.cpp
+++ b/src/mpc-hc/DVBChannel.cpp
@@ -110,7 +110,7 @@ void CDVBChannel::FromString(CString strValue)
CString CDVBChannel::ToString()
{
CString strValue;
- strValue.AppendFormat(_T("%d|%s|%ld|%d|%d|%d|%d|%ld|%ld|%ld|%ld|%ld|%ld|%ld|%d|%ld|%d|%d"),
+ strValue.AppendFormat(_T("%d|%s|%lu|%d|%d|%d|%d|%lu|%lu|%lu|%lu|%lu|%lu|%ld|%d|%ld|%d|%d"),
FORMAT_VERSION_CURRENT,
m_strName,
m_ulFrequency,
@@ -134,17 +134,17 @@ CString CDVBChannel::ToString()
if (m_Audios[i].Language.IsEmpty()) {
m_Audios[i].Language = " ";
}
- strValue.AppendFormat(_T("|%ld|%d|%d|%s"), m_Audios[i].PID, m_Audios[i].Type, m_Audios[i].PesType, m_Audios[i].Language);
+ strValue.AppendFormat(_T("|%lu|%d|%d|%s"), m_Audios[i].PID, m_Audios[i].Type, m_Audios[i].PesType, m_Audios[i].Language);
}
for (int i = 0; i < m_nSubtitleCount; i++) {
if (m_Subtitles[i].Language.IsEmpty()) {
m_Subtitles[i].Language = " ";
}
- strValue.AppendFormat(_T("|%ld|%d|%d|%s"), m_Subtitles[i].PID, m_Subtitles[i].Type, m_Subtitles[i].PesType, m_Subtitles[i].Language);
+ strValue.AppendFormat(_T("|%lu|%d|%d|%s"), m_Subtitles[i].PID, m_Subtitles[i].Type, m_Subtitles[i].PesType, m_Subtitles[i].Language);
}
- strValue.AppendFormat(_T("|%d|%d|%ld|%ld|%d"),
+ strValue.AppendFormat(_T("|%d|%d|%lu|%lu|%d"),
m_nVideoFps,
m_nVideoChroma,
m_nVideoWidth,
diff --git a/src/mpc-hc/FavoriteOrganizeDlg.cpp b/src/mpc-hc/FavoriteOrganizeDlg.cpp
index c583edf57..df3979de7 100644
--- a/src/mpc-hc/FavoriteOrganizeDlg.cpp
+++ b/src/mpc-hc/FavoriteOrganizeDlg.cpp
@@ -73,7 +73,7 @@ void CFavoriteOrganizeDlg::SetupList(bool fSave)
DVD_HMSF_TIMECODE hmsf = RT2HMSF(rt);
CString str;
- str.Format(_T("[%02d:%02d:%02d]"), hmsf.bHours, hmsf.bMinutes, hmsf.bSeconds);
+ str.Format(_T("[%02u:%02u:%02u]"), hmsf.bHours, hmsf.bMinutes, hmsf.bSeconds);
m_list.SetItemText(n, 1, str);
}
}
diff --git a/src/mpc-hc/MainFrm.cpp b/src/mpc-hc/MainFrm.cpp
index e39190489..d618963cd 100644
--- a/src/mpc-hc/MainFrm.cpp
+++ b/src/mpc-hc/MainFrm.cpp
@@ -1914,7 +1914,7 @@ void CMainFrame::OnTimer(UINT_PTR nIDEvent)
if (!sl.IsEmpty()) {
CString str;
- str.Format(_T("%s (p%d)"), Implode(sl, ' '), m_pBI->GetPriority());
+ str.Format(_T("%s (p%u)"), Implode(sl, ' '), m_pBI->GetPriority());
m_wndStatsBar.SetLine(ResStr(IDS_AG_BUFFERS), str);
}
@@ -1946,9 +1946,9 @@ void CMainFrame::OnTimer(UINT_PTR nIDEvent)
CString str;
if (cur != avg) {
- str.Format(_T("[%d]: %d/%d Kb/s"), i, avg, cur);
+ str.Format(_T("[%d]: %u/%u Kb/s"), i, avg, cur);
} else {
- str.Format(_T("[%d]: %d Kb/s"), i, avg);
+ str.Format(_T("[%d]: %u Kb/s"), i, avg);
}
sl.AddTail(str);
}
@@ -4925,7 +4925,7 @@ void CMainFrame::SaveThumbnails(LPCTSTR fn)
str.Format(L"{\\an7\\1c&Hffffff&\\4a&Hb0&\\bord1\\shad4\\be1}{\\p1}m %d %d l %d %d %d %d %d %d{\\p}",
r.left, r.top, r.right, r.top, r.right, r.bottom, r.left, r.bottom);
rts.Add(str, true, 0, 1, _T("thumbs"));
- str.Format(L"{\\an3\\1c&Hffffff&\\3c&H000000&\\alpha&H80&\\fs16\\b1\\bord2\\shad0\\pos(%d,%d)}%02d:%02d:%02d",
+ str.Format(L"{\\an3\\1c&Hffffff&\\3c&H000000&\\alpha&H80&\\fs16\\b1\\bord2\\shad0\\pos(%d,%d)}%02u:%02u:%02u",
r.right - 5, r.bottom - 3, hmsf.bHours, hmsf.bMinutes, hmsf.bSeconds);
rts.Add(str, true, 1, 2, _T("thumbs"));
@@ -5091,9 +5091,9 @@ CString CMainFrame::GetVidPos() const
DVD_HMSF_TIMECODE tcDur = RT2HMSF(stop);
if (tcDur.bHours > 0 || (pos >= stop && tcNow.bHours > 0)) {
- posstr.Format(_T("%02d.%02d.%02d"), tcNow.bHours, tcNow.bMinutes, tcNow.bSeconds);
+ posstr.Format(_T("%02u.%02u.%02u"), tcNow.bHours, tcNow.bMinutes, tcNow.bSeconds);
} else {
- posstr.Format(_T("%02d.%02d"), tcNow.bMinutes, tcNow.bSeconds);
+ posstr.Format(_T("%02u.%02u"), tcNow.bMinutes, tcNow.bSeconds);
}
}
@@ -8270,7 +8270,7 @@ void CMainFrame::OnNavigateSkip(UINT nID)
REFERENCE_TIME rtDur;
m_pMS->GetDuration(&rtDur);
CString m_strOSD;
- m_strOSD.Format(_T("%s/%s %s%d/%d - \"%s\""), ReftimeToString2(rt), ReftimeToString2(rtDur), ResStr(IDS_AG_CHAPTER2), i + 1, nChapters, name);
+ m_strOSD.Format(_T("%s/%s %s%d/%u - \"%s\""), ReftimeToString2(rt), ReftimeToString2(rtDur), ResStr(IDS_AG_CHAPTER2), i + 1, nChapters, name);
m_OSD.DisplayMessage(OSD_TOPLEFT, m_strOSD, 3000);
return;
}
@@ -8336,10 +8336,10 @@ void CMainFrame::OnNavigateSkip(UINT nID)
CString m_strOSD;
if (stop > 0) {
DVD_HMSF_TIMECODE stopHMSF = RT2HMS_r(stop);
- m_strOSD.Format(_T("%s/%s %s, %s%02d/%02d"), DVDtimeToString(Location.TimeCode, stopHMSF.bHours > 0), DVDtimeToString(stopHMSF),
+ m_strOSD.Format(_T("%s/%s %s, %s%02u/%02u"), DVDtimeToString(Location.TimeCode, stopHMSF.bHours > 0), DVDtimeToString(stopHMSF),
m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
} else {
- m_strOSD.Format(_T("%s, %s%02d/%02d"), m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
+ m_strOSD.Format(_T("%s, %s%02u/%02u"), m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
}
m_OSD.DisplayMessage(OSD_TOPLEFT, m_strOSD, 3000);
@@ -8564,7 +8564,7 @@ void CMainFrame::OnNavigateChapters(UINT nID)
REFERENCE_TIME rtDur;
m_pMS->GetDuration(&rtDur);
CString m_strOSD;
- m_strOSD.Format(_T("%s/%s %s%d/%d - \"%s\""), ReftimeToString2(rt), ReftimeToString2(rtDur), ResStr(IDS_AG_CHAPTER2), id + 1, m_pCB->ChapGetCount(), name);
+ m_strOSD.Format(_T("%s/%s %s%d/%u - \"%s\""), ReftimeToString2(rt), ReftimeToString2(rtDur), ResStr(IDS_AG_CHAPTER2), id + 1, m_pCB->ChapGetCount(), name);
m_OSD.DisplayMessage(OSD_TOPLEFT, m_strOSD, 3000);
}
return;
@@ -8613,10 +8613,10 @@ void CMainFrame::OnNavigateChapters(UINT nID)
CString m_strOSD;
if (stop > 0) {
DVD_HMSF_TIMECODE stopHMSF = RT2HMS_r(stop);
- m_strOSD.Format(_T("%s/%s %s, %s%02d/%02d"), DVDtimeToString(Location.TimeCode, stopHMSF.bHours > 0), DVDtimeToString(stopHMSF),
+ m_strOSD.Format(_T("%s/%s %s, %s%02u/%02u"), DVDtimeToString(Location.TimeCode, stopHMSF.bHours > 0), DVDtimeToString(stopHMSF),
m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
} else {
- m_strOSD.Format(_T("%s, %s%02d/%02d"), m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
+ m_strOSD.Format(_T("%s, %s%02u/%02u"), m_strTitle, ResStr(IDS_AG_CHAPTER2), Location.ChapterNum, ulNumOfChapters);
}
m_OSD.DisplayMessage(OSD_TOPLEFT, m_strOSD, 3000);
@@ -8872,7 +8872,7 @@ void CMainFrame::AddFavorite(bool fDisplayMessage, bool fShowDialog)
DVD_PLAYBACK_LOCATION2 Location;
m_pDVDI->GetCurrentLocation(&Location);
CString desc;
- desc.Format(_T("%s - T%02d C%02d - %02d:%02d:%02d"), fn, Location.TitleNum, Location.ChapterNum,
+ desc.Format(_T("%s - T%02u C%02u - %02u:%02u:%02u"), fn, Location.TitleNum, Location.ChapterNum,
Location.TimeCode.bHours, Location.TimeCode.bMinutes, Location.TimeCode.bSeconds);
// Name
@@ -10775,7 +10775,7 @@ void CMainFrame::SetupDVDChapters()
if (m_pDVDI && SUCCEEDED(m_pDVDI->GetDVDDirectory(buff, _countof(buff), &len)) &&
SUCCEEDED(m_pDVDI->GetCurrentLocation(&loc))) {
CStringW path;
- path.Format(L"%s\\VTS_%02d_0.IFO", buff, loc.TitleNum);
+ path.Format(L"%s\\VTS_%02u_0.IFO", buff, loc.TitleNum);
CVobFile vob;
CAtlList<CString> files;
@@ -12523,7 +12523,7 @@ void CMainFrame::SetupFiltersSubMenu()
CString name;
if (!wname) {
name.LoadString(IDS_AG_UNKNOWN_STREAM);
- name.AppendFormat(_T(" %d"), i + 1);
+ name.AppendFormat(_T(" %u"), i + 1);
} else {
name = wname;
name.Replace(_T("&"), _T("&&"));
@@ -13436,7 +13436,7 @@ void CMainFrame::SetupFavoritesSubMenu()
REFERENCE_TIME rt = 0;
if (1 == _stscanf_s(sl.GetHead(), _T("%I64d"), &rt) && rt > 0) {
DVD_HMSF_TIMECODE hmsf = RT2HMSF(rt);
- str.Format(_T("[%02d:%02d:%02d]"), hmsf.bHours, hmsf.bMinutes, hmsf.bSeconds);
+ str.Format(_T("[%02u:%02u:%02u]"), hmsf.bHours, hmsf.bMinutes, hmsf.bSeconds);
bPositionDataPresent = true;
}
@@ -15251,14 +15251,14 @@ void CMainFrame::SendNowPlayingToApi()
ULONG ulFlags;
if (SUCCEEDED(m_pDVDI->GetTotalTitleTime(&tcDur, &ulFlags))) {
// calculate duration in seconds
- strDur.Format(L"%u", tcDur.bHours * 60 * 60 + tcDur.bMinutes * 60 + tcDur.bSeconds);
+ strDur.Format(L"%d", tcDur.bHours * 60 * 60 + tcDur.bMinutes * 60 + tcDur.bSeconds);
}
// build string
// DVD - xxxxx|currenttitle|numberofchapters|currentchapter|titleduration
- author.Format(L"%d", Location.TitleNum);
- description.Format(L"%d", ulNumOfChapters);
- label.Format(L"%d", Location.ChapterNum);
+ author.Format(L"%u", Location.TitleNum);
+ description.Format(L"%u", ulNumOfChapters);
+ label.Format(L"%u", Location.ChapterNum);
}
}
}
@@ -15461,7 +15461,7 @@ void CMainFrame::SendCurrentPositionToApi(bool fNotifySeek)
DVD_PLAYBACK_LOCATION2 Location;
// get current location while playing disc, will return 0, if at a menu
if (m_pDVDI->GetCurrentLocation(&Location) == S_OK) {
- strPos.Format(L"%u", Location.TimeCode.bHours * 60 * 60 + Location.TimeCode.bMinutes * 60 + Location.TimeCode.bSeconds);
+ strPos.Format(L"%d", Location.TimeCode.bHours * 60 * 60 + Location.TimeCode.bMinutes * 60 + Location.TimeCode.bSeconds);
}
}
diff --git a/src/mpc-hc/PPageAccelTbl.cpp b/src/mpc-hc/PPageAccelTbl.cpp
index a349e8434..802506626 100644
--- a/src/mpc-hc/PPageAccelTbl.cpp
+++ b/src/mpc-hc/PPageAccelTbl.cpp
@@ -149,7 +149,7 @@ void CPPageAccelTbl::SetupList()
m_list.SetItemText(row, COL_KEY, hotkey);
CString id;
- id.Format(_T("%d"), wc.cmd);
+ id.Format(_T("%u"), wc.cmd);
m_list.SetItemText(row, COL_ID, id);
m_list.SetItemText(row, COL_MOUSE, MakeMouseButtonLabel(wc.mouse));
diff --git a/src/mpc-hc/PPageAudioSwitcher.cpp b/src/mpc-hc/PPageAudioSwitcher.cpp
index 0ebb447ef..aa61c946d 100644
--- a/src/mpc-hc/PPageAudioSwitcher.cpp
+++ b/src/mpc-hc/PPageAudioSwitcher.cpp
@@ -374,7 +374,7 @@ BOOL CPPageAudioSwitcher::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResu
static CString strTipText; // static string
- strTipText.Format(_T("+%u%%"), m_AudioBoostCtrl.GetPos());
+ strTipText.Format(_T("+%d%%"), m_AudioBoostCtrl.GetPos());
pTTT->lpszText = (LPWSTR)(LPCWSTR)strTipText;
diff --git a/src/mpc-hc/PPageSubStyle.cpp b/src/mpc-hc/PPageSubStyle.cpp
index ceb623ebb..27c5fbdda 100644
--- a/src/mpc-hc/PPageSubStyle.cpp
+++ b/src/mpc-hc/PPageSubStyle.cpp
@@ -138,7 +138,7 @@ BOOL CPPageSubStyle::OnInitDialog()
m_iCharset = -1;
for (int i = 0; i < CharSetLen; i++) {
CString str;
- str.Format(_T("%s (%d)"), CharSetNames[i], CharSetList[i]);
+ str.Format(_T("%s (%u)"), CharSetNames[i], CharSetList[i]);
m_charset.AddString(str);
m_charset.SetItemData(i, CharSetList[i]);
if (m_stss.charSet == CharSetList[i]) {
diff --git a/src/mpc-hc/PlayerCaptureDialog.h b/src/mpc-hc/PlayerCaptureDialog.h
index 665c627bc..ac12607d3 100644
--- a/src/mpc-hc/PlayerCaptureDialog.h
+++ b/src/mpc-hc/PlayerCaptureDialog.h
@@ -194,7 +194,7 @@ public:
switch (bih->biCompression) {
case BI_RGB:
- str.Format(_T("RGB%d"), bih->biBitCount);
+ str.Format(_T("RGB%u"), bih->biBitCount);
break;
case BI_RLE8:
str = _T("RLE8");
@@ -203,7 +203,7 @@ public:
str = _T("RLE4");
break;
case BI_BITFIELDS:
- str.Format(_T("BITF%d"), bih->biBitCount);
+ str.Format(_T("BITF%u"), bih->biBitCount);
break;
case BI_JPEG:
str = _T("JPEG");
@@ -245,7 +245,7 @@ public:
if (pfe->mt.formattype == FORMAT_VideoInfo2) {
VIDEOINFOHEADER2* vih2 = (VIDEOINFOHEADER2*)pfe->mt.pbFormat;
CString str2;
- str2.Format(_T(" i%02x %d:%d"), vih2->dwInterlaceFlags, vih2->dwPictAspectRatioX, vih2->dwPictAspectRatioY);
+ str2.Format(_T(" i%02x %u:%u"), vih2->dwInterlaceFlags, vih2->dwPictAspectRatioX, vih2->dwPictAspectRatioY);
str += str2;
}
@@ -312,10 +312,10 @@ public:
str.Empty();
CString str2;
- str2.Format(_T("%6dKHz "), wfe->nSamplesPerSec);
+ str2.Format(_T("%6uKHz "), wfe->nSamplesPerSec);
str += str2;
- str2.Format(_T("%dbps "), wfe->wBitsPerSample);
+ str2.Format(_T("%ubps "), wfe->wBitsPerSample);
str += str2;
switch (wfe->nChannels) {
@@ -326,12 +326,12 @@ public:
str += _T("stereo ");
break;
default:
- str2.Format(_T("%d channels "), wfe->nChannels);
+ str2.Format(_T("%u channels "), wfe->nChannels);
str += str2;
break;
}
- str2.Format(_T("%3dkbps "), wfe->nAvgBytesPerSec * 8 / 1000);
+ str2.Format(_T("%3ukbps "), wfe->nAvgBytesPerSec * 8 / 1000);
str += str2;
return str;
diff --git a/src/mpc-hc/PlayerSeekBar.cpp b/src/mpc-hc/PlayerSeekBar.cpp
index 8bbcc5f14..911f71404 100644
--- a/src/mpc-hc/PlayerSeekBar.cpp
+++ b/src/mpc-hc/PlayerSeekBar.cpp
@@ -547,9 +547,9 @@ void CPlayerSeekBar::UpdateToolTipText()
CString time;
if (tcNow.bHours > 0) {
- time.Format(_T("%02d:%02d:%02d"), tcNow.bHours, tcNow.bMinutes, tcNow.bSeconds);
+ time.Format(_T("%02u:%02u:%02u"), tcNow.bHours, tcNow.bMinutes, tcNow.bSeconds);
} else {
- time.Format(_T("%02d:%02d"), tcNow.bMinutes, tcNow.bSeconds);
+ time.Format(_T("%02u:%02u"), tcNow.bMinutes, tcNow.bSeconds);
}
CComBSTR chapterName;
diff --git a/src/mpc-hc/PlayerStatusBar.cpp b/src/mpc-hc/PlayerStatusBar.cpp
index d0b7123de..c7033b31d 100644
--- a/src/mpc-hc/PlayerStatusBar.cpp
+++ b/src/mpc-hc/PlayerStatusBar.cpp
@@ -232,23 +232,23 @@ void CPlayerStatusBar::SetStatusTimer(REFERENCE_TIME rtNow, REFERENCE_TIME rtDur
}
if (tcDur.bHours > 0 || (rtNow >= rtDur && tcNow.bHours > 0)) {
- posstr.Format(_T("%02d:%02d:%02d"), tcNow.bHours, tcNow.bMinutes, tcNow.bSeconds);
- rstr.Format(_T("%02d:%02d:%02d"), tcRt.bHours, tcRt.bMinutes, tcRt.bSeconds);
+ posstr.Format(_T("%02u:%02u:%02u"), tcNow.bHours, tcNow.bMinutes, tcNow.bSeconds);
+ rstr.Format(_T("%02u:%02u:%02u"), tcRt.bHours, tcRt.bMinutes, tcRt.bSeconds);
} else {
- posstr.Format(_T("%02d:%02d"), tcNow.bMinutes, tcNow.bSeconds);
- rstr.Format(_T("%02d:%02d"), tcRt.bMinutes, tcRt.bSeconds);
+ posstr.Format(_T("%02u:%02u"), tcNow.bMinutes, tcNow.bSeconds);
+ rstr.Format(_T("%02u:%02u"), tcRt.bMinutes, tcRt.bSeconds);
}
if (tcDur.bHours > 0) {
- durstr.Format(_T("%02d:%02d:%02d"), tcDur.bHours, tcDur.bMinutes, tcDur.bSeconds);
+ durstr.Format(_T("%02u:%02u:%02u"), tcDur.bHours, tcDur.bMinutes, tcDur.bSeconds);
} else {
- durstr.Format(_T("%02d:%02d"), tcDur.bMinutes, tcDur.bSeconds);
+ durstr.Format(_T("%02u:%02u"), tcDur.bMinutes, tcDur.bSeconds);
}
if (fHighPrecision) {
- posstr.AppendFormat(_T(".%03d"), (rtNow / 10000) % 1000);
- durstr.AppendFormat(_T(".%03d"), (rtDur / 10000) % 1000);
- rstr.AppendFormat(_T(".%03d"), ((rtDur - rtNow) / 10000) % 1000);
+ posstr.AppendFormat(_T(".%03d"), int((rtNow / 10000) % 1000));
+ durstr.AppendFormat(_T(".%03d"), int((rtDur / 10000) % 1000));
+ rstr.AppendFormat(_T(".%03d"), int(((rtDur - rtNow) / 10000) % 1000));
}
} else if (*pTimeFormat == TIME_FORMAT_FRAME) {
posstr.Format(_T("%I64d"), rtNow);
diff --git a/src/mpc-hc/TunerScanDlg.cpp b/src/mpc-hc/TunerScanDlg.cpp
index 24b27da54..ad220fe69 100644
--- a/src/mpc-hc/TunerScanDlg.cpp
+++ b/src/mpc-hc/TunerScanDlg.cpp
@@ -219,7 +219,7 @@ LRESULT CTunerScanDlg::OnNewChannel(WPARAM wParam, LPARAM lParam)
m_ChannelList.SetItemText(nItem, TSCC_NAME, Channel.GetName());
- strTemp.Format(_T("%d"), Channel.GetFrequency());
+ strTemp.Format(_T("%u"), Channel.GetFrequency());
m_ChannelList.SetItemText(nItem, TSCC_FREQUENCY, strTemp);
strTemp = Channel.IsEncrypted() ? ResStr(IDS_DVB_CHANNEL_ENCRYPTED) : ResStr(IDS_DVB_CHANNEL_NOT_ENCRYPTED);
@@ -235,12 +235,12 @@ LRESULT CTunerScanDlg::OnNewChannel(WPARAM wParam, LPARAM lParam)
strTemp = Channel.GetVideoFpsDesc();
m_ChannelList.SetItemText(nItem, TSCC_VIDEO_FPS, strTemp);
if (Channel.GetVideoWidth() || Channel.GetVideoHeight()) {
- strTemp.Format(_T("%dx%d"), Channel.GetVideoWidth(), Channel.GetVideoHeight());
+ strTemp.Format(_T("%ux%u"), Channel.GetVideoWidth(), Channel.GetVideoHeight());
} else {
strTemp = _T(" - ");
}
m_ChannelList.SetItemText(nItem, TSCC_VIDEO_RES, strTemp);
- strTemp.Format(_T("%d/%d"), Channel.GetVideoARy(), Channel.GetVideoARx());
+ strTemp.Format(_T("%u/%u"), Channel.GetVideoARy(), Channel.GetVideoARx());
m_ChannelList.SetItemText(nItem, TSCC_VIDEO_AR, strTemp);
m_ChannelList.SetItemText(nItem, TSCC_CHANNEL, (LPCTSTR) lParam);
}
diff --git a/src/mpc-hc/UpdateChecker.cpp b/src/mpc-hc/UpdateChecker.cpp
index ba9cd4601..2412a09e0 100644
--- a/src/mpc-hc/UpdateChecker.cpp
+++ b/src/mpc-hc/UpdateChecker.cpp
@@ -55,7 +55,7 @@ Update_Status UpdateChecker::IsUpdateAvailable(const Version& currentVersion)
OSVERSIONINFOEX osVersion = SysVersion::GetFullVersion();
CString osVersionStr;
- osVersionStr.Format(_T("Windows %1d.%1d"), osVersion.dwMajorVersion, osVersion.dwMinorVersion);
+ osVersionStr.Format(_T("Windows %1u.%1u"), osVersion.dwMajorVersion, osVersion.dwMinorVersion);
if (SysVersion::Is64Bit()) {
osVersionStr += _T(" x64");
}
diff --git a/src/mpc-hc/WebClientSocket.cpp b/src/mpc-hc/WebClientSocket.cpp
index df961a184..55c35757d 100644
--- a/src/mpc-hc/WebClientSocket.cpp
+++ b/src/mpc-hc/WebClientSocket.cpp
@@ -427,7 +427,7 @@ bool CWebClientSocket::OnIndex(CStringA& hdr, CStringA& body, CStringA& mime)
while (pos) {
const wmcmd& wc = s.wmcmds.GetNext(pos);
CStringA str;
- str.Format("%d", wc.cmd);
+ str.Format("%u", wc.cmd);
CStringA valueName(UTF8(wc.GetName()));
valueName.Replace("&", "&amp;");
wmcoptions += "<option value=\"" + str + "\">" + valueName + "</option>\r\n";
@@ -627,7 +627,7 @@ bool CWebClientSocket::OnBrowser(CStringA& hdr, CStringA& body, CStringA& mime)
}
CStringA size;
- size.Format("%I64dK", ((UINT64)fd.nFileSizeHigh << 22) | (fd.nFileSizeLow >> 10));
+ size.Format("%I64uK", ((UINT64)fd.nFileSizeHigh << 22) | (fd.nFileSizeLow >> 10));
CString type(_T("&nbsp;"));
LoadType(fullpath, type);
diff --git a/src/mpc-hc/WebServer.cpp b/src/mpc-hc/WebServer.cpp
index d7dab578b..b23ff3b0e 100644
--- a/src/mpc-hc/WebServer.cpp
+++ b/src/mpc-hc/WebServer.cpp
@@ -634,14 +634,14 @@ bool CWebServer::CallCGI(CWebClientSocket* pClient, CStringA& hdr, CStringA& bod
UINT port;
if (pClient->GetPeerName(name, port)) {
- str.Format(_T("%d"), port);
+ str.Format(_T("%u"), port);
env.AddTail(_T("REMOTE_ADDR=") + name);
env.AddTail(_T("REMOTE_HOST=") + name);
env.AddTail(_T("REMOTE_PORT=") + str);
}
if (pClient->GetSockName(name, port)) {
- str.Format(_T("%d"), port);
+ str.Format(_T("%u"), port);
env.AddTail(_T("SERVER_NAME=") + name);
env.AddTail(_T("SERVER_PORT=") + str);
}
diff --git a/src/mpc-hc/mplayerc.cpp b/src/mpc-hc/mplayerc.cpp
index 93987c195..5a432b18f 100644
--- a/src/mpc-hc/mplayerc.cpp
+++ b/src/mpc-hc/mplayerc.cpp
@@ -1120,7 +1120,7 @@ BOOL CMPlayerCApp::InitInstance()
TRACE(_T("Terminate on corruption enabled\n"));
} else {
CString heap_err;
- heap_err.Format(_T("Terminate on corruption error = %d\n"), GetLastError());
+ heap_err.Format(_T("Terminate on corruption error = %u\n"), GetLastError());
TRACE(heap_err);
}