[Analyzers][CPP]Turn on warning 26471 (#23103)

Don't use reinterpret_cast. A cast from void* can use static_cast
This commit is contained in:
sosssego
2023-01-16 08:18:55 -03:00
committed by GitHub
parent 1a1f4351ca
commit d84a13bb7e
11 changed files with 24 additions and 9 deletions

View File

@@ -727,7 +727,7 @@ DWORD WINAPI CPowerRenameManager::s_fileOpWorkerThread(_In_ void* pv)
{
if (SUCCEEDED(CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)))
{
WorkerThreadData* pwtd = reinterpret_cast<WorkerThreadData*>(pv);
WorkerThreadData* pwtd = static_cast<WorkerThreadData*>(pv);
if (pwtd)
{
bool closeUIWindowAfterRenaming = true;
@@ -914,7 +914,7 @@ DWORD WINAPI CPowerRenameManager::s_regexWorkerThread(_In_ void* pv)
try
{
winrt::check_hresult(CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE));
WorkerThreadData* pwtd = reinterpret_cast<WorkerThreadData*>(pv);
WorkerThreadData* pwtd = static_cast<WorkerThreadData*>(pv);
if (pwtd)
{
PostMessage(pwtd->hwndManager, SRM_REGEX_STARTED, GetCurrentThreadId(), 0);