mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
[CPP][Analyzers] turn on warning 4189 (#21522)
* Turn on 4189 and fix code * changes from PR comments
This commit is contained in:
@@ -62,7 +62,6 @@ optional<path> GetRootPath()
|
||||
|
||||
wstring GetChecksum(path filePath)
|
||||
{
|
||||
DWORD dwStatus = 0;
|
||||
BOOL bResult = FALSE;
|
||||
HCRYPTPROV hProv = 0;
|
||||
HCRYPTHASH hHash = 0;
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace
|
||||
vector<pair<wstring, wstring>> QueryValues(HKEY key)
|
||||
{
|
||||
DWORD cValues;
|
||||
DWORD retCode = RegQueryInfoKeyW(key, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &cValues, nullptr, nullptr, nullptr, nullptr);
|
||||
RegQueryInfoKeyW(key, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &cValues, nullptr, nullptr, nullptr, nullptr);
|
||||
TCHAR achValue[255];
|
||||
DWORD cchValue = 255;
|
||||
LPBYTE value;
|
||||
@@ -282,7 +282,7 @@ void ReportRegistry(const filesystem::path& tmpDir)
|
||||
{
|
||||
DWORD data = 0;
|
||||
DWORD dataSize = sizeof(data);
|
||||
LONG retCode = RegGetValueW(rootKey, subKey.c_str(), value.c_str(), flags, &type, &data, &dataSize);
|
||||
result = RegGetValueW(rootKey, subKey.c_str(), value.c_str(), flags, &type, &data, &dataSize);
|
||||
if (result == ERROR_SUCCESS)
|
||||
{
|
||||
registryReport << "\t" << value << " > " << data << "\n";
|
||||
|
||||
Reference in New Issue
Block a user