[Analyzers][CPP]Turn on warning 4505 (#22301)

* Turn on warning 4505
supress it in the fancyzone tests

* comment on disabled warnings

* improving comments

* change strategy to have less #pragma
This commit is contained in:
sosssego 2022-12-09 10:58:59 +00:00 committed by GitHub
parent f97cda9196
commit d8b92662ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -42,7 +42,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>26800;28251;6387;4505;4679;4702;6248;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>26800;28251;6387;4679;4702;6248;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableAnalyzeExternal >true</DisableAnalyzeExternal> <DisableAnalyzeExternal >true</DisableAnalyzeExternal>
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel> <ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
<ConformanceMode>false</ConformanceMode> <ConformanceMode>false</ConformanceMode>

View File

@ -1,5 +1,8 @@
#pragma once #pragma once
// disable warning 4505 -'function' : unreferenced local function has been removed
// as not all functions from Util.h are used in this test
#pragma warning(push)
#pragma warning(disable : 4505)
#include "FancyZonesLib/FancyZonesDataTypes.h" #include "FancyZonesLib/FancyZonesDataTypes.h"
namespace CustomAssert namespace CustomAssert
@ -145,3 +148,5 @@ std::wstring Microsoft::VisualStudio::CppUnitTestFramework::ToString(const std::
str += L"}"; str += L"}";
return str; return str;
} }
#pragma warning(pop)