PVS-StudioWarnings

PVS-Studio warning V501 for Miranda IM

Nov 18th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. USERINFO* UM_AddUser(STATUSINFO* pStatusList,
  2.   USERINFO** ppUserList, const TCHAR* pszUID,
  3.   const TCHAR* pszNick, WORD wStatus)
  4. {
  5.   ...
  6.   if (!pStatusList || !ppUserList || !ppUserList)
  7.     return NULL;
  8.   ...
  9. }
  10.  
  11. This suspicious code was found in Miranda IM project by PVS-Studio static code analyzer.
  12. Warning message is:
  13. V501 There are identical sub-expressions to the left and to the right of the '||' operator: !pStatusList ||!ppUserList ||!ppUserList  chat  manager.c  1333
  14.  
  15. 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