PVS-StudioWarnings

PVS-Studio warning V656 for Doom3

Nov 10th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. uint AltOp::fixedLength()
  2. {
  3.   uint l1 = exp1->fixedLength();
  4.   uint l2 = exp1->fixedLength();
  5.  
  6.   if (l1 != l2 || l1 == ~0u)
  7.     return ~0;
  8.  
  9.   return l1;
  10. }
  11.  
  12. This suspicious code was found in Doom3 project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V656 Variables are initialized through the call to the same function. It's probably an error or un-optimized code. Consider inspecting the 'exp1->fixedLength()' expression. actions.cc 391
  15.  
  16. 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