Advertisement
PVS-StudioWarnings

PVS-Studio warning V614 for VirtualBox

Nov 27th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. static int suplibOsStopService(void)
  2. {
  3.   /* Assume it didn't exist, so we'll create the service. */
  4.   int  rc;
  5.   SC_HANDLE  hSMgr = OpenSCManager(....);
  6.   ....
  7.   if (hSMgr)
  8.   {
  9.     ....
  10.     rc = VINF_SUCCESS;
  11.     ....
  12.   }
  13.   return rc;
  14. }
  15.  
  16. This suspicious code was found in VirtualBox project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V614 Potentially uninitialized variable 'rc' used. suplib-win.cpp 367
  19.  
  20. 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
Advertisement