[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

@@ -14,7 +14,7 @@ public:
~WorkArea();
public:
inline bool Init(HINSTANCE hinstance, const FancyZonesDataTypes::WorkAreaId& parentUniqueId)
inline bool Init([[maybe_unused]] HINSTANCE hinstance, const FancyZonesDataTypes::WorkAreaId& parentUniqueId)
{
#ifndef UNIT_TESTS
if (!InitWindow(hinstance))
@@ -22,7 +22,6 @@ public:
return false;
}
#endif
InitLayout(parentUniqueId);
return true;
}
@@ -60,7 +59,7 @@ public:
const std::unique_ptr<LayoutAssignedWindows>& GetLayoutWindows() const noexcept { return m_layoutWindows; }
ZoneIndexSet GetWindowZoneIndexes(HWND window) const noexcept;
HRESULT MoveSizeEnter(HWND window) noexcept;
HRESULT MoveSizeUpdate(POINT const& ptScreen, bool dragEnabled, bool selectManyZones) noexcept;
HRESULT MoveSizeEnd(HWND window) noexcept;
@@ -70,7 +69,7 @@ public:
bool MoveWindowIntoZoneByDirectionAndPosition(HWND window, DWORD vkCode, bool cycle) noexcept;
bool ExtendWindowByDirectionAndPosition(HWND window, DWORD vkCode) noexcept;
void SaveWindowProcessToZoneIndex(HWND window) noexcept;
void UpdateActiveZoneSet() noexcept;
void ShowZonesOverlay() noexcept;
@@ -115,7 +114,7 @@ inline std::shared_ptr<WorkArea> MakeWorkArea(HINSTANCE hinstance, HMONITOR moni
self->LogInitializationError();
return nullptr;
}
if (!self->Init(hinstance, parentUniqueId))
{
return nullptr;
@@ -123,4 +122,3 @@ inline std::shared_ptr<WorkArea> MakeWorkArea(HINSTANCE hinstance, HMONITOR moni
return self;
}