PVS-StudioWarnings

PVS-Studio warning V524 for OpenMW

Nov 19th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. class Factory
  2. {
  3.   ....
  4.   bool getReadSourceCache() { return mReadSourceCache; }
  5.   bool getWriteSourceCache() { return mReadSourceCache; }
  6.   ....
  7.   bool mReadSourceCache;
  8.   bool mWriteSourceCache;
  9.   ....
  10. };
  11.  
  12. This suspicious code was found in OpenMW project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V524 It is odd that the body of 'getWriteSourceCache' function is fully equivalent to the body of 'getReadSourceCache' function. components factory.hpp 209
  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