Advertisement
PVS-StudioWarnings

PVS-Studio warning V559 for Miranda IM

Nov 21st, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. int FindItem(....)
  2. {
  3.   ...
  4.   int ret;
  5.   ret=FindItem(hwnd,dat,hItem,
  6.                (struct ClcContact ** )&z,
  7.                (struct  ClcGroup** )&isv,NULL);
  8.   if (ret=0) {return (0);}
  9.   ...
  10. }
  11.  
  12. This is what should have been written here: if (ret==0) {return (0);}
  13.  
  14. This suspicious code was found in Miranda IM project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V559 Suspicious assignment inside the condition expression of 'if' operator: ret = 0. clist_mw clcidents.c 179
  17.  
  18. 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