PVS-StudioWarnings

PVS-Studio warning V560 for Pcsx2

Nov 19th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. LRESULT CALLBACK IOP_DISASM(HWND hDlg, UINT message,
  2.                         WPARAM wParam, LPARAM lParam)
  3. {
  4.   ...
  5.   switch(LOWORD(wParam))
  6.   {
  7.     case (IDOK || IDCANCEL):
  8.       EndDialog(hDlg,TRUE);
  9.       return(TRUE);
  10.       break;
  11.   }
  12.   ...
  13. }
  14.  
  15. Most likely this is what should be written here:  case IDOK: case IDCANCEL:
  16.  
  17. This suspicious code was found in Pcsx2 project by PVS-Studio static code analyzer.
  18. Warning message is:
  19. V560 A part of conditional expression is always true: 2. pcsx2 debugger.cpp 321
  20.  
  21. 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