PVS-StudioWarnings

PVS-Studio warning V530 for MTASA

Nov 18th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. std::map < SString, SFunctionTimingInfo > m_TimingMap;
  2.  
  3. void CPerfStatFunctionTimingImpl::DoPulse ( void )
  4. {
  5.   ....
  6.   // Do nothing if not active
  7.   if ( !m_bIsActive )
  8.   {
  9.     m_TimingMap.empty ();
  10.     return;
  11.   }
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in MTASA project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V530 The return value of function 'empty' is required to be utilized. cperfstat.functiontiming.cpp 197
  18.  
  19. 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