Advertisement
PVS-StudioWarnings

PVS-Studio warning V571 for CryEngineSDK

Nov 25th, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. inline typename CryStringT<T>::size_type
  2. CryStringT<T>::rfind( value_type ch,size_type pos ) const
  3. {
  4.   const_str str;
  5.   if (pos == npos) {
  6.     ....
  7.   } else {
  8.     if (pos == npos)
  9.       pos = length();
  10.   ....
  11. }
  12.  
  13. This suspicious code was found in CryEngineSDK project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V571 Recurring check. The 'if (pos == npos)' condition was already verified in line 1447. crystring.h 1453
  16.  
  17. 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