PVS-StudioWarnings

PVS-Studio warning V614 for Chromium

Nov 20th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. HRESULT IEEventSink::Attach(IWebBrowser2* browser) {
  2.   DCHECK(browser);
  3.   HRESULT result;
  4.   if (browser) {
  5.     web_browser2_ = browser;
  6.     FindIEProcessId();
  7.     result = DispEventAdvise(web_browser2_,
  8.                              &DIID_DWebBrowserEvents2);
  9.   }
  10.   return result;
  11. }
  12.  
  13. This suspicious code was found in Chromium project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V614 Potentially uninitialized variable 'result' used. ie_event_sink.cc 240
  16.  
  17. PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment