Fix format specifier warnings - /Wv:18 can now be removed
As a follow up to my previous pull request, this PR fixes the last remaining improper format specifiers. This allows to remove /Wv:18 compilation flag completely, since (presumably) the only reason it was added in the first place were those format specifier warnings, introduced in VS2015. Effectively, all this PR does is applying fixes suggested by the compiler (included in those warnings). Close #4604
This commit is contained in:
parent
587d3494c7
commit
6b5144d176
@ -29,6 +29,7 @@
|
||||
#include <shlwapi.h>
|
||||
#include <DbgHelp.h>
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
#include "PluginsManager.h"
|
||||
#include "resource.h"
|
||||
|
||||
@ -536,7 +537,7 @@ void PluginsManager::runPluginCommand(size_t i)
|
||||
catch (...)
|
||||
{
|
||||
TCHAR funcInfo[128];
|
||||
generic_sprintf(funcInfo, TEXT("runPluginCommand(size_t i : %d)"), i);
|
||||
generic_sprintf(funcInfo, TEXT("runPluginCommand(size_t i : %zd)"), i);
|
||||
pluginCrashAlert(_pluginsCommands[i]._pluginName.c_str(), funcInfo);
|
||||
}
|
||||
}
|
||||
@ -596,7 +597,7 @@ void PluginsManager::notify(const SCNotification *notification)
|
||||
catch (...)
|
||||
{
|
||||
TCHAR funcInfo[256];
|
||||
generic_sprintf(funcInfo, TEXT("notify(SCNotification *notification) : \r notification->nmhdr.code == %d\r notification->nmhdr.hwndFrom == %p\r notification->nmhdr.idFrom == %d"),\
|
||||
generic_sprintf(funcInfo, TEXT("notify(SCNotification *notification) : \r notification->nmhdr.code == %d\r notification->nmhdr.hwndFrom == %p\r notification->nmhdr.idFrom == %" PRIuPTR),\
|
||||
scNotif.nmhdr.code, scNotif.nmhdr.hwndFrom, scNotif.nmhdr.idFrom);
|
||||
pluginCrashAlert(_pluginInfos[i]->_moduleName.c_str(), funcInfo);
|
||||
}
|
||||
@ -622,7 +623,7 @@ void PluginsManager::relayNppMessages(UINT Message, WPARAM wParam, LPARAM lParam
|
||||
catch (...)
|
||||
{
|
||||
TCHAR funcInfo[128];
|
||||
generic_sprintf(funcInfo, TEXT("relayNppMessages(UINT Message : %d, WPARAM wParam : %d, LPARAM lParam : %d)"), Message, wParam, lParam);
|
||||
generic_sprintf(funcInfo, TEXT("relayNppMessages(UINT Message : %u, WPARAM wParam : %" PRIuPTR ", LPARAM lParam : %" PRIiPTR ")"), Message, wParam, lParam);
|
||||
pluginCrashAlert(_pluginInfos[i]->_moduleName.c_str(), funcInfo);
|
||||
}
|
||||
}
|
||||
@ -653,7 +654,7 @@ bool PluginsManager::relayPluginMessages(UINT Message, WPARAM wParam, LPARAM lPa
|
||||
catch (...)
|
||||
{
|
||||
TCHAR funcInfo[128];
|
||||
generic_sprintf(funcInfo, TEXT("relayPluginMessages(UINT Message : %d, WPARAM wParam : %d, LPARAM lParam : %d)"), Message, wParam, lParam);
|
||||
generic_sprintf(funcInfo, TEXT("relayPluginMessages(UINT Message : %u, WPARAM wParam : %" PRIuPTR ", LPARAM lParam : %" PRIiPTR ")"), Message, wParam, lParam);
|
||||
pluginCrashAlert(_pluginInfos[i]->_moduleName.c_str(), funcInfo);
|
||||
}
|
||||
return true;
|
||||
|
@ -105,7 +105,6 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<SmallerTypeCheck>false</SmallerTypeCheck>
|
||||
<DisableSpecificWarnings>4091;4456;4457;4459</DisableSpecificWarnings>
|
||||
<WarningVersion>18</WarningVersion>
|
||||
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -143,7 +142,6 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<SmallerTypeCheck>false</SmallerTypeCheck>
|
||||
<DisableSpecificWarnings>4091;4456;4457;4459</DisableSpecificWarnings>
|
||||
<WarningVersion>18</WarningVersion>
|
||||
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -187,7 +185,6 @@
|
||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4091;4456;4457;4459</DisableSpecificWarnings>
|
||||
<WarningVersion>18</WarningVersion>
|
||||
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -239,7 +236,6 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
|
||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4091;4456;4457;4459</DisableSpecificWarnings>
|
||||
<WarningVersion>18</WarningVersion>
|
||||
<AdditionalOptions>/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
Loading…
Reference in New Issue
Block a user