PVS-StudioWarnings

PVS-Studio warning V560 for Miranda IM

Nov 11th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #define GC_UNICODE 0x01000
  2.  
  3. DWORD dwFlags;
  4.  
  5. UINT CreateGCMenu(....)
  6. {
  7.   ...
  8.   if (iIndex == 1 && si->iType != GCW_SERVER &&
  9.       !(si->dwFlags && GC_UNICODE)) {
  10.   ...
  11. }
  12.  
  13. This is what should have been written here: (si->dwFlags & GC_UNICODE)
  14.  
  15. This suspicious code was found in Miranda IM project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V560 A part of conditional expression is always true: 0x01000. tabsrmm tools.cpp 1023
  18.  
  19. 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