Advertisement
PVS-StudioWarnings

PVS-Studio warning V612 for CryEngineSDK

Nov 24th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. void CWeapon::AccessoriesChanged(bool initialLoadoutSetup)
  2. {
  3.   ....
  4.   for (int i = 0; i < numZoommodes; i++)
  5.   {
  6.     CIronSight* pZoomMode = ....
  7.     const SZoomModeParams* pCurrentParams = ....
  8.     const SZoomModeParams* pNewParams = ....
  9.     if(pNewParams != pCurrentParams)
  10.     {
  11.       pZoomMode->ResetSharedParams(pNewParams);
  12.     }
  13.     break;
  14.   }
  15.   ....
  16. }
  17.  
  18. This suspicious code was found in CryEngineSDK project by PVS-Studio static code analyzer.
  19. Warning message is:
  20. V612 An unconditional 'break' within a loop. weapon.cpp 2854
  21.  
  22. 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