Advertisement
PVS-StudioWarnings

PVS-Studio warning V606 for DDKSamples

Nov 27th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. bool ParseNumber(....)
  2. {
  3.   ....
  4.   if ((*Value < Bounds.first) ||
  5.       (*Value > Bounds.second))
  6.   {
  7.     printf("Value %s is out of bounds\n", String.c_str());
  8.     false;
  9.   }
  10.   ....
  11. }
  12.  
  13. This is what should have been written here: "return false".
  14.  
  15.  
  16. This suspicious code was found in DDKSamples project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V606 Ownerless token 'false'. util.cpp 91
  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