mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-07 17:42:45 +08:00
[Analyzers][CPP] turn on Warning 4706 (#21434)
* 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 * disable 4706 for external code
This commit is contained in:
parent
7a8c0bc6fb
commit
c51103404f
@ -42,7 +42,7 @@
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>26800;28251;4100;4127;4189;4239;4244;4245;4389;4456;4457;4701;6387;4458;4505;4515;4459;4702;4706;6031;6248;26451;28182;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>26800;28251;4100;4127;4189;4239;4244;4245;4389;4456;4457;4701;6387;4458;4505;4515;4459;4702;6031;6248;26451;28182;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableAnalyzeExternal >true</DisableAnalyzeExternal>
|
||||
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
|
@ -45,7 +45,7 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\deps\cziplib\src\zip.c">
|
||||
<!-- Disabling warnings for external code -->
|
||||
<DisableSpecificWarnings>26451;4267;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>26451;4706;4267;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ClCompile Include="EventViewer.cpp" />
|
||||
<ClCompile Include="InstallationFolder.cpp" />
|
||||
|
@ -106,7 +106,8 @@ wstring GetChecksum(path filePath)
|
||||
return L"CryptCreateHash() failed. " + get_last_error_or_default(GetLastError());
|
||||
}
|
||||
|
||||
while (bResult = ReadFile(hFile, rgbFile, bufferSize, &cbRead, NULL))
|
||||
bResult = ReadFile(hFile, rgbFile, bufferSize, &cbRead, NULL);
|
||||
while (bResult)
|
||||
{
|
||||
if (0 == cbRead)
|
||||
{
|
||||
@ -120,6 +121,8 @@ wstring GetChecksum(path filePath)
|
||||
CloseHandle(hFile);
|
||||
return L"CryptHashData() failed. " + get_last_error_or_default(GetLastError());;
|
||||
}
|
||||
|
||||
bResult = ReadFile(hFile, rgbFile, bufferSize, &cbRead, NULL);
|
||||
}
|
||||
|
||||
if (!bResult)
|
||||
|
Loading…
Reference in New Issue
Block a user