PVS-StudioWarnings

PVS-Studio warning V535 for Doom3

Nov 18th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. bool idMatX::IsOrthonormal( const float epsilon ) const {
  2.   ...
  3.   for ( int i = 0; i < numRows; i++ ) {
  4.     ...
  5.     for ( i = 1; i < numRows; i++ ) {
  6.       ...
  7.     }
  8.     if ( idMath::Fabs( sum ) > epsilon ) {
  9.       return false;
  10.     }
  11.   }
  12.   return true;
  13. }
  14.  
  15. This suspicious code was found in Doom3 project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V535 The variable 'i' is being used for this loop and for the outer loop. idLib matrix.cpp 3128
  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