PVS-StudioWarnings

PVS-Studio warning V649 for Coin3D

Nov 10th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. int
  2. SbProfilingData::operator == (const SbProfilingData & rhs) const
  3. {
  4.   if (this->actionType != rhs.actionType) return FALSE;
  5.   if (this->actionStartTime != rhs.actionStopTime) return FALSE;
  6.   if (this->actionStartTime != rhs.actionStopTime) return FALSE;
  7.   ....
  8. }
  9.  
  10. This suspicious code was found in Coin3D project by PVS-Studio static code analyzer.
  11. Warning message is:
  12. V649 There are two 'if' statements with identical conditional expressions. The first 'if' statement contains function return. This means that the second 'if' statement is senseless. Check lines: 1205, 1206. sbprofilingdata.cpp 1206
  13.  
  14. 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