From 2074d32cb160c036faeec38a7e1c276c6bb31f07 Mon Sep 17 00:00:00 2001 From: sosssego Date: Tue, 22 Nov 2022 20:02:40 +0000 Subject: [PATCH] [Analyzers][CPP]Turn on warning 4701 (#22151) --- Cpp.Build.props | 2 +- src/modules/fancyzones/FancyZonesLib/Layout.cpp | 2 +- tools/BugReportTool/BugReportTool/Main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cpp.Build.props b/Cpp.Build.props index 39e6506dc2..cc965a7f9d 100644 --- a/Cpp.Build.props +++ b/Cpp.Build.props @@ -42,7 +42,7 @@ pch.h Level4 - 26800;28251;4389;4701;6387;4458;4505;4515;4459;4702;6031;6248;26451;28182;%(DisableSpecificWarnings) + 26800;28251;4389;6387;4458;4505;4515;4459;4702;6031;6248;26451;28182;%(DisableSpecificWarnings) true TurnOffAllWarnings false diff --git a/src/modules/fancyzones/FancyZonesLib/Layout.cpp b/src/modules/fancyzones/FancyZonesLib/Layout.cpp index 64b172d3f8..67853b4489 100644 --- a/src/modules/fancyzones/FancyZonesLib/Layout.cpp +++ b/src/modules/fancyzones/FancyZonesLib/Layout.cpp @@ -267,7 +267,7 @@ ZoneIndexSet Layout::GetCombinedZoneRange(const ZoneIndexSet& initialZones, cons ZoneIndexSet combinedZones, result; std::set_union(begin(initialZones), end(initialZones), begin(finalZones), end(finalZones), std::back_inserter(combinedZones)); - RECT boundingRect; + RECT boundingRect{}; bool boundingRectEmpty = true; for (ZoneIndex zoneId : combinedZones) diff --git a/tools/BugReportTool/BugReportTool/Main.cpp b/tools/BugReportTool/BugReportTool/Main.cpp index 6b9302dd88..c2e1e540e4 100644 --- a/tools/BugReportTool/BugReportTool/Main.cpp +++ b/tools/BugReportTool/BugReportTool/Main.cpp @@ -160,7 +160,7 @@ void ReportWindowsVersion(const filesystem::path& tmpDir) { auto versionReportPath = tmpDir; versionReportPath = versionReportPath.append("windows-version.txt"); - OSVERSIONINFOEXW osInfo; + OSVERSIONINFOEXW osInfo{}; try {