Advertisement
PVS-StudioWarnings

PVS-Studio warning V501 for MongoDB

Nov 24th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. bool operator==(const MemberCfg& r) const {
  2.   ....
  3.   return _id==r._id && votes == r.votes &&
  4.          h == r.h && priority == r.priority &&
  5.          arbiterOnly == r.arbiterOnly &&
  6.          slaveDelay == r.slaveDelay &&
  7.          hidden == r.hidden &&
  8.          buildIndexes == buildIndexes;        <<<---
  9. }
  10.  
  11. This suspicious code was found in MongoDB project by PVS-Studio static code analyzer.
  12. Warning message is:
  13. V501 There are identical sub-expressions to the left and to the right of the '==' operator: buildIndexes == buildIndexes rs_config.h 101
  14.  
  15. 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