From 0485e33a4f76a7f68d241e32070487ffb4b3dfce Mon Sep 17 00:00:00 2001 From: Kirill Frolov Date: Tue, 17 Dec 2019 14:23:02 +0300 Subject: [PATCH] Fixed warning from static analyzer. Variable `hr' might be uninitialized in case, when Initialized() function was called twice. --- src/profilerinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/profilerinfo.cpp b/src/profilerinfo.cpp index 0551c8e..b3e2442 100644 --- a/src/profilerinfo.cpp +++ b/src/profilerinfo.cpp @@ -38,7 +38,7 @@ HRESULT ProfilerInfo::Initialize(IUnknown *pICorProfilerInfoUnk) noexcept { this->Reset(); // Ensure ProfilerInfo is in initial state. - HRESULT hr; + HRESULT hr = S_OK; // for case when Initialize() called twice if (m_pProfilerInfo7 == nullptr) { -- 2.34.1