[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

@@ -13,9 +13,9 @@
#include <common/utils/logger_helper.h>
#include <common/utils/winapi_error.h>
BOOL APIENTRY DllMain(HMODULE hModule,
BOOL APIENTRY DllMain(HMODULE /*hModule*/,
DWORD ul_reason_for_call,
LPVOID lpReserved)
LPVOID /*lpReserved*/)
{
switch (ul_reason_for_call)
{
@@ -30,6 +30,7 @@ BOOL APIENTRY DllMain(HMODULE hModule,
Trace::UnregisterProvider();
break;
}
return TRUE;
}
@@ -127,7 +128,7 @@ private:
}
else
{
Logger::error( L"TextExtractor failed to start. {}", get_last_error_or_default(GetLastError()));
Logger::error(L"TextExtractor failed to start. {}", get_last_error_or_default(GetLastError()));
}
m_hProcess = sei.hProcess;
@@ -207,7 +208,7 @@ public:
return settings.serialize_to_buffer(buffer, buffer_size);
}
virtual void call_custom_action(const wchar_t* action) override
virtual void call_custom_action(const wchar_t* /*action*/) override
{
}
@@ -254,7 +255,7 @@ public:
Trace::EnablePowerOCR(false);
}
virtual bool on_hotkey(size_t hotkeyId) override
virtual bool on_hotkey(size_t /*hotkeyId*/) override
{
if (m_enabled)
{
@@ -268,7 +269,7 @@ public:
return true;
}
return false;
return false;
}
virtual size_t get_hotkeys(Hotkey* hotkeys, size_t buffer_size) override
@@ -292,7 +293,6 @@ public:
{
return m_enabled;
}
};
extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()