PVS-StudioWarnings

PVS-Studio warning V649 for RunAsAdmin

Nov 20th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.09 KB | None | 0 0
  1. class xmlInputCharData {
  2. public:
  3.   static bool isBaseChar(wchar_t l) {
  4.     ....
  5.     if (l >= 0x06BA && l <= 0x06BE) return true;
  6.     if (l >= 0x06C0 && l <= 0x06CE) return true;
  7.     if (l >= 0x06D0 && l <= 0x06D3) return true;
  8.     if (l == 0x06D5) return true;                  <<<---
  9.     if (l >= 0x06E5 && l <= 0x06E6) return true;
  10.     if (l >= 0x0905 && l <= 0x0939) return true;
  11.     if (l == 0x06D5) return true;                  <<<---
  12.     if (l >= 0x0958 && l <= 0x0961) return true;
  13.     if (l >= 0x0985 && l <= 0x098C) return true;
  14.     if (l >= 0x098F && l <= 0x0990) return true;
  15.     ....
  16.   }
  17.  
  18. This suspicious code was found in RunAsAdmin project by PVS-Studio static code analyzer.
  19. Warning message is:
  20. 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: 67, 70. cannonical_xml.h 70
  21.  
  22. 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