diff --git a/Application/Application.vcxproj b/Application/Application.vcxproj
index 21f190b7..53d451bf 100644
--- a/Application/Application.vcxproj
+++ b/Application/Application.vcxproj
@@ -17,7 +17,6 @@
- 4018;4090;4114;4267;4351;4786;4800;4996
Windows
diff --git a/Common/Gfx/FontCollectionD2D.cpp b/Common/Gfx/FontCollectionD2D.cpp
index 1692513a..ab0837ea 100644
--- a/Common/Gfx/FontCollectionD2D.cpp
+++ b/Common/Gfx/FontCollectionD2D.cpp
@@ -51,7 +51,7 @@ bool FontCollectionD2D::InitializeCollection()
loader, &m_FileReferences, sizeof(m_FileReferences), &m_Collection);
}
- return m_Collection;
+ return m_Collection != nullptr;
}
bool FontCollectionD2D::AddFile(const WCHAR* file)
diff --git a/Common/MathParser.cpp b/Common/MathParser.cpp
index a8a0c922..5b0e11b5 100644
--- a/Common/MathParser.cpp
+++ b/Common/MathParser.cpp
@@ -375,7 +375,7 @@ const WCHAR* Parse(
{
Operation op;
if (lexer.nameLen <= FUNC_MAX_LEN &&
- ((op.funcIndex = GetFunctionIndex(lexer.name, lexer.nameLen)) != FUNC_INVALID))
+ ((op.funcIndex = GetFunctionIndex(lexer.name, (BYTE)lexer.nameLen)) != FUNC_INVALID))
{
switch (op.funcIndex)
{
@@ -402,13 +402,13 @@ const WCHAR* Parse(
else
{
double dblval;
- if (getValue && getValue(lexer.name, lexer.nameLen, &dblval, getValueContext))
+ if (getValue && getValue(lexer.name, (int)lexer.nameLen, &dblval, getValueContext))
{
parser.numStack[++parser.valTop] = dblval;
break;
}
- std::wstring name(lexer.name, lexer.nameLen);
+ const std::wstring name(lexer.name, lexer.nameLen);
_snwprintf_s(errorBuffer, _TRUNCATE, eUnknFunc, name.c_str());
return errorBuffer;
}
diff --git a/Common/StringUtil.cpp b/Common/StringUtil.cpp
index b0aec559..d3093d3c 100644
--- a/Common/StringUtil.cpp
+++ b/Common/StringUtil.cpp
@@ -49,7 +49,7 @@ std::wstring Widen(const char* str, int strLen, int cp)
{
if (strLen == -1)
{
- strLen = strlen(str);
+ strLen = (int)strlen(str);
}
int bufLen = MultiByteToWideChar(cp, 0, str, strLen, nullptr, 0);
diff --git a/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcxproj b/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcxproj
index 033c5487..05bb5732 100644
--- a/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcxproj
+++ b/Plugins/PluginAdvancedCPU/PluginAdvancedCPU.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
diff --git a/Plugins/PluginCoreTemp/PluginCoreTemp.vcxproj b/Plugins/PluginCoreTemp/PluginCoreTemp.vcxproj
index 53485222..1df57f81 100644
--- a/Plugins/PluginCoreTemp/PluginCoreTemp.vcxproj
+++ b/Plugins/PluginCoreTemp/PluginCoreTemp.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
diff --git a/Plugins/PluginFileView/PluginFileView.cpp b/Plugins/PluginFileView/PluginFileView.cpp
index 5c7c20db..8f7bec5d 100644
--- a/Plugins/PluginFileView/PluginFileView.cpp
+++ b/Plugins/PluginFileView/PluginFileView.cpp
@@ -306,7 +306,7 @@ PLUGIN_EXPORT double Update(void* data)
int trueIndex = child->ignoreCount ? child->index : ((child->index % parent->count) + parent->indexOffset);
double value = 0;
- if (!parent->files.empty() && trueIndex >= 0 && trueIndex < parent->files.size())
+ if (!parent->files.empty() && trueIndex >= 0 && trueIndex < (int)parent->files.size())
{
switch (child->type)
{
@@ -382,7 +382,7 @@ PLUGIN_EXPORT LPCWSTR GetString(void* data)
int trueIndex = child->ignoreCount ? child->index : ((child->index % parent->count) + parent->indexOffset);
child->strValue = L"";
- if (!parent->files.empty() && trueIndex >= 0 && trueIndex < parent->files.size())
+ if (!parent->files.empty() && trueIndex >= 0 && trueIndex < (int)parent->files.size())
{
switch (child->type)
{
@@ -511,7 +511,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
if (parent->ownerChild == child)
{
- if (parent->files.size() > parent->count)
+ if ((int)parent->files.size() > parent->count)
{
if (_wcsicmp(args, L"PAGEUP") == 0)
{
@@ -528,7 +528,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
}
else if (_wcsicmp(args, L"PAGEDOWN") == 0)
{
- if ((parent->indexOffset + ( 2 * parent->count)) < parent->files.size())
+ if ((parent->indexOffset + (2 * parent->count)) < (int)parent->files.size())
{
parent->indexOffset += parent->count;
parent->needsIcons = true;
@@ -554,7 +554,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
}
else if (_wcsicmp(args, L"INDEXDOWN") == 0)
{
- if ((parent->indexOffset + parent->count) < parent->files.size())
+ if ((parent->indexOffset + parent->count) < (int)parent->files.size())
{
++parent->indexOffset;
parent->needsIcons = true;
@@ -583,7 +583,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
else
{
parent->path.clear();
- for (int i = 0; i < path.size() - 1; ++i)
+ for (size_t i = 0; i < path.size() - 1; ++i)
{
parent->path += path[i];
parent->path += L"\\";
@@ -600,7 +600,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
}
int trueIndex = child->ignoreCount ? child->index : ((child->index % parent->count) + parent->indexOffset);
- if (!parent->files.empty() && trueIndex >= 0 && trueIndex < parent->files.size())
+ if (!parent->files.empty() && trueIndex >= 0 && trueIndex < (int)parent->files.size())
{
if (_wcsicmp(args, L"OPEN") == 0)
{
@@ -618,7 +618,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
else
{
parent->path.clear();
- for (int i = 0; i < path.size() - 1; ++i)
+ for (size_t i = 0; i < path.size() - 1; ++i)
{
parent->path += path[i];
parent->path += L"\\";
@@ -876,7 +876,7 @@ unsigned __stdcall SystemThreadProc(void* pParam)
EnterCriticalSection(&g_CriticalSection);
int trueIndex = iter->ignoreCount ? iter->index : ((iter->index % iter->parent->count) + iter->parent->indexOffset);
- if (iter->type == TYPE_ICON && trueIndex >= 0 && trueIndex < tmp->files.size())
+ if (iter->type == TYPE_ICON && trueIndex >= 0 && trueIndex < (int)tmp->files.size())
{
std::wstring filePath = tmp->files[trueIndex].path;
filePath += (tmp->files[trueIndex].fileName == L"..") ? L"" :tmp->files[trueIndex].fileName;
diff --git a/Plugins/PluginFileView/PluginFileView.vcxproj b/Plugins/PluginFileView/PluginFileView.vcxproj
index 358eaef7..0f4af991 100644
--- a/Plugins/PluginFileView/PluginFileView.vcxproj
+++ b/Plugins/PluginFileView/PluginFileView.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions)
- 4018
diff --git a/Plugins/PluginFolderInfo/FolderInfo.cpp b/Plugins/PluginFolderInfo/FolderInfo.cpp
index 8f076006..55f859c5 100644
--- a/Plugins/PluginFolderInfo/FolderInfo.cpp
+++ b/Plugins/PluginFolderInfo/FolderInfo.cpp
@@ -131,7 +131,9 @@ void CFolderInfo::CalculateSize()
}
else if (!isFolder && m_RegExpFilter)
{
- int utf8BufLen = WideCharToMultiByte(CP_UTF8, 0, findData.cFileName, wcslen(findData.cFileName) + 1, utf8Buf, MAX_PATH * 3, nullptr, nullptr);
+ const int utf8BufLen = WideCharToMultiByte(
+ CP_UTF8, 0, findData.cFileName, (int)wcslen(findData.cFileName) + 1, utf8Buf, MAX_PATH * 3,
+ nullptr, nullptr);
if (0 != pcre_exec(m_RegExpFilter, nullptr, utf8Buf, utf8BufLen, 0, 0, nullptr, 0))
{
continue;
@@ -177,7 +179,7 @@ void CFolderInfo::SetRegExpFilter(LPCWSTR filter)
if (*filter)
{
- int filterLen = wcslen(filter) + 1;
+ const int filterLen = (int)wcslen(filter) + 1;
int bufLen = WideCharToMultiByte(CP_UTF8, 0, filter, filterLen, nullptr, 0, nullptr, nullptr);
char* buf = new char[bufLen];
diff --git a/Plugins/PluginFolderInfo/FolderInfoPlugin.cpp b/Plugins/PluginFolderInfo/FolderInfoPlugin.cpp
index a20fa8b3..c868ec8a 100644
--- a/Plugins/PluginFolderInfo/FolderInfoPlugin.cpp
+++ b/Plugins/PluginFolderInfo/FolderInfoPlugin.cpp
@@ -58,7 +58,7 @@ PLUGIN_EXPORT void Initialize(void** data, void* rm)
LPCWSTR str = RmReadString(rm, L"Folder", L"", FALSE);
if (*str == L'[')
{
- int len = wcslen(str);
+ const size_t len = wcslen(str);
for (auto iter = g_Measures.cbegin(); iter != g_Measures.cend(); ++iter)
{
if ((*iter)->folder &&
@@ -130,7 +130,7 @@ PLUGIN_EXPORT double Update(void* data)
switch (measure->type)
{
case MEASURE_FOLDERSIZE:
- return measure->folder->GetSize();
+ return (double)measure->folder->GetSize();
case MEASURE_FILECOUNT:
return measure->folder->GetFileCount();
diff --git a/Plugins/PluginFolderInfo/PluginFolderInfo.vcxproj b/Plugins/PluginFolderInfo/PluginFolderInfo.vcxproj
index 83f2b885..ef10e77a 100644
--- a/Plugins/PluginFolderInfo/PluginFolderInfo.vcxproj
+++ b/Plugins/PluginFolderInfo/PluginFolderInfo.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions)
- 4018;4090;4114;4244;4267;4351;4786;4800;4996
diff --git a/Plugins/PluginMediaKey/PluginMediaKey.vcxproj b/Plugins/PluginMediaKey/PluginMediaKey.vcxproj
index 6b6a783e..3c6c6b53 100644
--- a/Plugins/PluginMediaKey/PluginMediaKey.vcxproj
+++ b/Plugins/PluginMediaKey/PluginMediaKey.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
diff --git a/Plugins/PluginNowPlaying/NowPlaying.cpp b/Plugins/PluginNowPlaying/NowPlaying.cpp
index 7c5269e6..2d9ef8f2 100644
--- a/Plugins/PluginNowPlaying/NowPlaying.cpp
+++ b/Plugins/PluginNowPlaying/NowPlaying.cpp
@@ -79,7 +79,7 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
{
// PlayerName starts with [ so use referenced section
++str;
- int len = wcslen(str);
+ size_t len = wcslen(str);
if (len > 0 && str[len - 1] == L']')
{
--len;
@@ -198,7 +198,7 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
parent->player->AddInstance();
parent->playerPath = RmReadString(rm, L"PlayerPath", L"");
parent->trackChangeAction = RmReadString(rm, L"TrackChangeAction", L"", FALSE);
- parent->disableLeadingZero = RmReadInt(rm, L"DisableLeadingZero", 0);
+ parent->disableLeadingZero = RmReadInt(rm, L"DisableLeadingZero", 0) != 0;
if (oldPlayer)
{
@@ -518,7 +518,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
{
++arg; // Skip the space
- if (wcsnicmp(args, L"SetPosition", 11) == 0)
+ if (_wcsnicmp(args, L"SetPosition", 11) == 0)
{
int position = (_wtoi(arg) * (int)player->GetDuration()) / 100;
if (arg[0] == L'+' || arg[0] == L'-')
@@ -528,7 +528,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
player->SetPosition(position);
}
- else if (wcsnicmp(args, L"SetRating", 9) == 0)
+ else if (_wcsnicmp(args, L"SetRating", 9) == 0)
{
int rating = _wtoi(arg);
if (rating >= 0 && rating <= 5)
@@ -536,7 +536,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
player->SetRating(rating);
}
}
- else if (wcsnicmp(args, L"SetVolume", 9) == 0)
+ else if (_wcsnicmp(args, L"SetVolume", 9) == 0)
{
int volume = _wtoi(arg);
if (arg[0] == L'+' || arg[0] == L'-')
@@ -555,7 +555,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
}
player->SetVolume(volume);;
}
- else if (wcsnicmp(args, L"SetShuffle", 9) == 0)
+ else if (_wcsnicmp(args, L"SetShuffle", 9) == 0)
{
int state = _wtoi(arg);
if (state == -1)
@@ -564,10 +564,10 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
}
else if (state == 0 || state == 1)
{
- player->SetShuffle((bool)state);
+ player->SetShuffle(state != 0);
}
}
- else if (wcsnicmp(args, L"SetRepeat", 9) == 0)
+ else if (_wcsnicmp(args, L"SetRepeat", 9) == 0)
{
int state = _wtoi(arg);
if (state == -1)
@@ -576,7 +576,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
}
else if (state == 0 || state == 1)
{
- player->SetRepeat((bool)state);
+ player->SetRepeat(state != 0);
}
}
else
diff --git a/Plugins/PluginNowPlaying/PlayerAIMP.cpp b/Plugins/PluginNowPlaying/PlayerAIMP.cpp
index 869e2627..34f66df8 100644
--- a/Plugins/PluginNowPlaying/PlayerAIMP.cpp
+++ b/Plugins/PluginNowPlaying/PlayerAIMP.cpp
@@ -137,8 +137,8 @@ void PlayerAIMP::UpdateData()
return;
}
- m_Position = SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_POS);
- m_Volume = SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_VOLUME);
+ m_Position = (UINT)SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_POS);
+ m_Volume = (UINT)SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_VOLUME);
AIMP2FileInfo* info = (AIMP2FileInfo*)m_FileMap;
if (info->cbSizeOf > 0 &&
@@ -169,11 +169,11 @@ void PlayerAIMP::UpdateData()
m_Duration = info->nDuration / 1000;
m_Number = (UINT)info->nTrackID;
- m_Shuffle = (bool)SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_SHUFFLE);
- m_Repeat = (bool)SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_REPEAT);
+ m_Shuffle = SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_SHUFFLE) != 0;
+ m_Repeat = SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_REPEAT) != 0;
// Get rating through the AIMP Winamp API
- m_Rating = SendMessage(m_WinampWindow, WM_WA_IPC, 0, IPC_GETRATING);
+ m_Rating = (UINT)SendMessage(m_WinampWindow, WM_WA_IPC, 0, IPC_GETRATING);
if (filepath != m_FilePath)
{
diff --git a/Plugins/PluginNowPlaying/PlayerCAD.cpp b/Plugins/PluginNowPlaying/PlayerCAD.cpp
index af0279fa..7489c3d2 100644
--- a/Plugins/PluginNowPlaying/PlayerCAD.cpp
+++ b/Plugins/PluginNowPlaying/PlayerCAD.cpp
@@ -234,25 +234,25 @@ LRESULT CALLBACK PlayerCAD::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
case IPC_VOLUME_CHANGED_NOTIFICATION:
{
- player->m_Volume = wParam;
+ player->m_Volume = (UINT)wParam;
break;
}
case IPC_REPEAT_CHANGED_NOTIFICATION:
{
- player->m_Repeat = (bool)wParam;
+ player->m_Repeat = wParam != 0;
break;
}
case IPC_SHUFFLE_CHANGED_NOTIFICATION:
{
- player->m_Shuffle = (bool)wParam;
+ player->m_Shuffle = wParam != 0;
break;
}
case IPC_RATING_CHANGED_NOTIFICATION:
{
- player->m_Rating = (wParam + 1) / 2; // From 0 - 10 to 0 - 5
+ player->m_Rating = ((UINT)wParam + 1) / 2; // From 0 - 10 to 0 - 5
break;
}
@@ -270,8 +270,8 @@ LRESULT CALLBACK PlayerCAD::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
PCOPYDATASTRUCT cds = (PCOPYDATASTRUCT)lParam;
if (cds->dwData == IPC_CURRENT_TRACK_NOTIFICATION)
{
- player->m_Shuffle = (bool)SendMessage(player->m_PlayerWindow, WM_USER, 0, IPC_GET_SHUFFLE);
- player->m_Repeat = (bool)SendMessage(player->m_PlayerWindow, WM_USER, 0, IPC_GET_REPEAT);
+ player->m_Shuffle = SendMessage(player->m_PlayerWindow, WM_USER, 0, IPC_GET_SHUFFLE) != 0;
+ player->m_Repeat = SendMessage(player->m_PlayerWindow, WM_USER, 0, IPC_GET_REPEAT) != 0;
// TODO: Sent on track update?
++player->m_TrackCount;
@@ -418,8 +418,8 @@ void PlayerCAD::UpdateData()
{
if (m_State != STATE_STOPPED)
{
- m_Position = SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_POSITION);
- m_Volume = SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_VOLUME);
+ m_Position = (UINT)SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_POSITION);
+ m_Volume = (UINT)SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_VOLUME);
}
}
@@ -504,7 +504,7 @@ void PlayerCAD::SetVolume(int volume)
void PlayerCAD::SetShuffle(bool state)
{
SendMessage(m_PlayerWindow, WM_USER, (WPARAM)state, IPC_SET_SHUFFLE);
- m_Shuffle = (bool)SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_SHUFFLE);
+ m_Shuffle = SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_SHUFFLE) != 0;
}
/*
@@ -514,7 +514,7 @@ void PlayerCAD::SetShuffle(bool state)
void PlayerCAD::SetRepeat(bool state)
{
SendMessage(m_PlayerWindow, WM_USER, (WPARAM)state, IPC_SET_REPEAT);
- m_Repeat = (bool)SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_REPEAT);
+ m_Repeat = SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_REPEAT) != 0;
}
/*
diff --git a/Plugins/PluginNowPlaying/PlayerITunes.cpp b/Plugins/PluginNowPlaying/PlayerITunes.cpp
index 13700dbe..791e1198 100644
--- a/Plugins/PluginNowPlaying/PlayerITunes.cpp
+++ b/Plugins/PluginNowPlaying/PlayerITunes.cpp
@@ -340,7 +340,7 @@ void PlayerITunes::OnDatabaseChange()
hr = playlist->get_Shuffle(&shuffle);
if (SUCCEEDED(hr))
{
- m_Shuffle = (bool)shuffle;
+ m_Shuffle = shuffle != VARIANT_FALSE;
}
playlist->Release();
@@ -392,7 +392,7 @@ void PlayerITunes::OnTrackChange()
hr = playlist->get_SongRepeat(&repeat);
if (SUCCEEDED(hr))
{
- m_Repeat = (bool)repeat;
+ m_Repeat = repeat != ITPlaylistRepeatModeOff;
}
playlist->Release();
diff --git a/Plugins/PluginNowPlaying/PlayerWinamp.cpp b/Plugins/PluginNowPlaying/PlayerWinamp.cpp
index 591fff20..1ce4b1b5 100644
--- a/Plugins/PluginNowPlaying/PlayerWinamp.cpp
+++ b/Plugins/PluginNowPlaying/PlayerWinamp.cpp
@@ -105,7 +105,7 @@ void PlayerWinamp::UpdateData()
{
if (m_Initialized || CheckWindow())
{
- int playing = SendMessage(m_Window, WM_WA_IPC, 0, IPC_ISPLAYING);
+ const auto playing = SendMessage(m_Window, WM_WA_IPC, 0, IPC_ISPLAYING);
if (playing == 0)
{
// Make sure Winamp is still active
@@ -127,8 +127,8 @@ void PlayerWinamp::UpdateData()
else
{
m_State = (playing == 1) ? STATE_PLAYING : STATE_PAUSED;
- m_Position = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETOUTPUTTIME) / 1000; // ms to secs
- m_Volume = (SendMessage(m_Window, WM_WA_IPC, -666, IPC_SETVOLUME) * 100) / 255; // 0 - 255 to 0 - 100
+ m_Position = (UINT)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETOUTPUTTIME) / 1000; // ms to secs
+ m_Volume = ((UINT)SendMessage(m_Window, WM_WA_IPC, -666, IPC_SETVOLUME) * 100) / 255; // 0 - 255 to 0 - 100
}
WCHAR wBuffer[MAX_PATH];
@@ -145,7 +145,7 @@ void PlayerWinamp::UpdateData()
else
{
// MediaMonkey doesn't support wide IPC messages
- int pos = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETLISTPOS);
+ const auto pos = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETLISTPOS);
LPCVOID address = (LPCVOID)SendMessage(m_Window, WM_WA_IPC, pos, IPC_GETPLAYLISTFILE);
if (!ReadProcessMemory(m_WinampHandle, address, &cBuffer, sizeof(cBuffer), nullptr))
@@ -165,12 +165,12 @@ void PlayerWinamp::UpdateData()
if (!m_PlayingStream)
{
- int duration = SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
+ const int duration = (int)SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
m_Duration = (duration != -1) ? duration : 0;
- m_Rating = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETRATING);
- m_Shuffle = (bool)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_SHUFFLE);
- m_Repeat = (bool)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_REPEAT);
+ m_Rating = (UINT)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETRATING);
+ m_Shuffle = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_SHUFFLE) != 0;
+ m_Repeat = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_REPEAT) != 0;
TagLib::FileRef fr(wBuffer, false);
TagLib::Tag* tag = fr.tag();
@@ -270,7 +270,7 @@ void PlayerWinamp::UpdateData()
{
if (m_Duration == 0)
{
- int duration = SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
+ const int duration = (int)SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
m_Duration = (duration != -1) ? duration : 0;
}
@@ -285,7 +285,7 @@ void PlayerWinamp::UpdateData()
}
else
{
- int pos = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETLISTPOS);
+ const auto pos = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETLISTPOS);
LPCVOID address = (LPCVOID)SendMessage(m_Window, WM_WA_IPC, pos, IPC_GETPLAYLISTTITLE);
ReadProcessMemory(m_WinampHandle, address, &cBuffer, sizeof(cBuffer), nullptr);
mbstowcs(wBuffer, cBuffer, MAX_PATH);
diff --git a/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj b/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj
index 8443e4f3..11acb42c 100644
--- a/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj
+++ b/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj
@@ -20,7 +20,6 @@
_USRDLL;%(PreprocessorDefinitions)
./taglib;./taglib/toolkit;./taglib/asf;./taglib/mpeg;./taglib/ogg;./taglib/ogg/flac;./taglib/flac;./taglib/mpc;./taglib/ogg/vorbis;./taglib/mpeg/id3v2;./taglib/mpeg/id3v2/frames;./taglib/mpeg/id3v1;./taglib/ape;./taglib/wavpack;.\SDKs\;%(AdditionalIncludeDirectories)
- 4351;4800;4273;4251;4530;4996
false
false
diff --git a/Plugins/PluginPerfMon/PluginPerfMon.vcxproj b/Plugins/PluginPerfMon/PluginPerfMon.vcxproj
index 4f27bce2..257768ca 100644
--- a/Plugins/PluginPerfMon/PluginPerfMon.vcxproj
+++ b/Plugins/PluginPerfMon/PluginPerfMon.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
diff --git a/Plugins/PluginPing/PluginPing.vcxproj b/Plugins/PluginPing/PluginPing.vcxproj
index dab295d8..39bc42a8 100644
--- a/Plugins/PluginPing/PluginPing.vcxproj
+++ b/Plugins/PluginPing/PluginPing.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;PluginPing_EXPORTS;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies)
diff --git a/Plugins/PluginPower/PluginPower.vcxproj b/Plugins/PluginPower/PluginPower.vcxproj
index 0fbe075d..fe6a90ea 100644
--- a/Plugins/PluginPower/PluginPower.vcxproj
+++ b/Plugins/PluginPower/PluginPower.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
PowrProf.lib;%(AdditionalDependencies)
diff --git a/Plugins/PluginProcess/PluginProcess.vcxproj b/Plugins/PluginProcess/PluginProcess.vcxproj
index 52bf3077..4b27efd8 100644
--- a/Plugins/PluginProcess/PluginProcess.vcxproj
+++ b/Plugins/PluginProcess/PluginProcess.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
Psapi.lib;%(AdditionalDependencies)
diff --git a/Plugins/PluginQuote/PluginQuote.vcxproj b/Plugins/PluginQuote/PluginQuote.vcxproj
index 1b0d4e1d..1adce0cb 100644
--- a/Plugins/PluginQuote/PluginQuote.vcxproj
+++ b/Plugins/PluginQuote/PluginQuote.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
shlwapi.lib;%(AdditionalDependencies)
diff --git a/Plugins/PluginQuote/Quote.cpp b/Plugins/PluginQuote/Quote.cpp
index 995907a7..f8963bde 100644
--- a/Plugins/PluginQuote/Quote.cpp
+++ b/Plugins/PluginQuote/Quote.cpp
@@ -60,7 +60,7 @@ void ScanFolder(std::vector& files, std::vector& fil
{
if (!filters.empty())
{
- for (int i = 0; i < filters.size(); ++i)
+ for (size_t i = 0; i < filters.size(); ++i)
{
if (!filters[i].empty() && PathMatchSpec(fileData.cFileName, filters[i].c_str()))
{
diff --git a/Plugins/PluginRecycleManager/PluginRecycleManager.vcxproj b/Plugins/PluginRecycleManager/PluginRecycleManager.vcxproj
index bb2093cd..255fae07 100644
--- a/Plugins/PluginRecycleManager/PluginRecycleManager.vcxproj
+++ b/Plugins/PluginRecycleManager/PluginRecycleManager.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
diff --git a/Plugins/PluginResMon/PluginResMon.vcxproj b/Plugins/PluginResMon/PluginResMon.vcxproj
index 2c9f6aff..337556d6 100644
--- a/Plugins/PluginResMon/PluginResMon.vcxproj
+++ b/Plugins/PluginResMon/PluginResMon.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
Psapi.lib;%(AdditionalDependencies)
diff --git a/Plugins/PluginSpeedFan/PluginSpeedFan.vcxproj b/Plugins/PluginSpeedFan/PluginSpeedFan.vcxproj
index ee699c6a..0ee4e2c4 100644
--- a/Plugins/PluginSpeedFan/PluginSpeedFan.vcxproj
+++ b/Plugins/PluginSpeedFan/PluginSpeedFan.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
diff --git a/Plugins/PluginSysInfo/PluginSysInfo.vcxproj b/Plugins/PluginSysInfo/PluginSysInfo.vcxproj
index 76bac159..229e17ba 100644
--- a/Plugins/PluginSysInfo/PluginSysInfo.vcxproj
+++ b/Plugins/PluginSysInfo/PluginSysInfo.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
Rasapi32.lib;Iphlpapi.lib;%(AdditionalDependencies)
diff --git a/Plugins/PluginSysInfo/SysInfo.cpp b/Plugins/PluginSysInfo/SysInfo.cpp
index 506b6a76..cab8d47f 100644
--- a/Plugins/PluginSysInfo/SysInfo.cpp
+++ b/Plugins/PluginSysInfo/SysInfo.cpp
@@ -301,7 +301,7 @@ PLUGIN_EXPORT LPCWSTR GetString(void* data)
}
}
}
- else if (measure->data < ipTable->dwNumEntries)
+ else if (measure->data < (int)ipTable->dwNumEntries)
{
DWORD ip = ipTable->table[measure->data].dwAddr;
wsprintf(sBuffer, L"%i.%i.%i.%i", ip % 256, (ip >> 8) % 256, (ip >> 16) % 256, (ip >> 24) % 256);
@@ -314,7 +314,7 @@ PLUGIN_EXPORT LPCWSTR GetString(void* data)
if (NO_ERROR == GetIpAddrTable((PMIB_IPADDRTABLE)tmpBuffer, &tmpBufferLen, FALSE))
{
PMIB_IPADDRTABLE ipTable = (PMIB_IPADDRTABLE)tmpBuffer;
- if (measure->data < ipTable->dwNumEntries)
+ if (measure->data < (int)ipTable->dwNumEntries)
{
DWORD ip = ipTable->table[measure->data].dwMask;
wsprintf(sBuffer, L"%i.%i.%i.%i", ip % 256, (ip >> 8) % 256, (ip >> 16) % 256, (ip >> 24) % 256);
diff --git a/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcxproj b/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcxproj
index 5291481b..b3894aee 100644
--- a/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcxproj
+++ b/Plugins/PluginVirtualDesktops/PluginVirtualDesktops.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
diff --git a/Plugins/PluginWebParser/PluginWebParser.vcxproj b/Plugins/PluginWebParser/PluginWebParser.vcxproj
index 6758a394..ba06026d 100644
--- a/Plugins/PluginWebParser/PluginWebParser.vcxproj
+++ b/Plugins/PluginWebParser/PluginWebParser.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions)
- 4018;4090;4114;4244;4267;4351;4786;4800;4996
Urlmon.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies)
diff --git a/Plugins/PluginWebParser/WebParser.cpp b/Plugins/PluginWebParser/WebParser.cpp
index 4ed43028..bbfbd8c4 100644
--- a/Plugins/PluginWebParser/WebParser.cpp
+++ b/Plugins/PluginWebParser/WebParser.cpp
@@ -920,14 +920,14 @@ void ParseData(MeasureData* measure, LPCSTR parseData, DWORD dwSize)
// Must convert the data to utf8
utf8Data = StringUtil::NarrowUTF8((LPCWSTR)parseData, dwSize / 2);
parseData = utf8Data.c_str();
- dwSize = utf8Data.length();
+ dwSize = (DWORD)utf8Data.length();
}
else if (measure->codepage != CP_UTF8 && measure->codepage != 0) // 0 = CP_ACP
{
// Must convert the data to utf8
utf8Data = ConvertAsciiToUTF8(parseData, dwSize, measure->codepage);
parseData = utf8Data.c_str();
- dwSize = utf8Data.length();
+ dwSize = (DWORD)utf8Data.length();
}
rc = pcre_exec(
diff --git a/Plugins/PluginWifiStatus/PluginWifiStatus.vcxproj b/Plugins/PluginWifiStatus/PluginWifiStatus.vcxproj
index c12b822e..29266c17 100644
--- a/Plugins/PluginWifiStatus/PluginWifiStatus.vcxproj
+++ b/Plugins/PluginWifiStatus/PluginWifiStatus.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
wlanapi.lib;%(AdditionalDependencies)
diff --git a/Plugins/PluginWin7Audio/PluginWin7Audio.vcxproj b/Plugins/PluginWin7Audio/PluginWin7Audio.vcxproj
index 21f66527..f06044be 100644
--- a/Plugins/PluginWin7Audio/PluginWin7Audio.vcxproj
+++ b/Plugins/PluginWin7Audio/PluginWin7Audio.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
diff --git a/Plugins/PluginWindowMessage/PluginWindowMessage.vcxproj b/Plugins/PluginWindowMessage/PluginWindowMessage.vcxproj
index 87a41567..167606db 100644
--- a/Plugins/PluginWindowMessage/PluginWindowMessage.vcxproj
+++ b/Plugins/PluginWindowMessage/PluginWindowMessage.vcxproj
@@ -19,7 +19,6 @@
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996
diff --git a/Plugins/PluginiTunes/PluginiTunes.vcxproj b/Plugins/PluginiTunes/PluginiTunes.vcxproj
index 055d47d0..15c1b445 100644
--- a/Plugins/PluginiTunes/PluginiTunes.vcxproj
+++ b/Plugins/PluginiTunes/PluginiTunes.vcxproj
@@ -20,7 +20,6 @@
iTunesCOMWindowsSDK;%(AdditionalIncludeDirectories)
_USRDLL;%(PreprocessorDefinitions)
- 4018;4090;4114;4351;4786;4800;4996