[Analyzers][CPP] turn on Warning 4100 (#21449)

* Analyzers CPP

Changing the warning level from 3 to 4.
change some project files to make them use the warning config in cpp props file.

* Analyzers C++ turn on warning 4706

Change Cpp.Build.props file to enable 4706
fix BugReportTool code to get rid of 4706

* Turn on warning 4100 and fix the code

* Follow c++ core guidelines

* Adapting to PR comments
This commit is contained in:
sosssego
2022-11-09 14:41:14 +00:00
committed by GitHub
parent cca10d2455
commit 78f5b4c3a4
40 changed files with 128 additions and 127 deletions

View File

@@ -17,7 +17,7 @@
// Non-localizable
const std::wstring fancyZonesPath = L"modules\\FancyZones\\PowerToys.FancyZones.exe";
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
{
switch (ul_reason_for_call)
{
@@ -59,20 +59,20 @@ public:
// Return JSON with the configuration options.
// These are the settings shown on the settings page along with their current values.
virtual bool get_config(_Out_ PWSTR buffer, _Out_ int* buffer_size) override
virtual bool get_config(_Out_ PWSTR /*buffer*/, _Out_ int* /*buffer_size*/) override
{
return false;
}
// Passes JSON with the configuration settings for the powertoy.
// This is called when the user hits Save on the settings page.
virtual void set_config(PCWSTR config) override
virtual void set_config(PCWSTR /*config*/) override
{
}
// Signal from the Settings editor to call a custom action.
// This can be used to spawn more complex editors.
virtual void call_custom_action(const wchar_t* action) override
virtual void call_custom_action(const wchar_t* /*action*/) override
{
SetEvent(m_toggleEditorEvent);
}
@@ -124,7 +124,7 @@ public:
{
app_name = GET_RESOURCE_STRING(IDS_FANCYZONES);
app_key = NonLocalizable::ModuleKey;
m_toggleEditorEvent = CreateDefaultEvent(CommonSharedConstants::FANCY_ZONES_EDITOR_TOGGLE_EVENT);
if (!m_toggleEditorEvent)
{