PVS-StudioWarnings

PVS-Studio warning V547 for Miranda IM

Nov 20th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. INT_PTR CALLBACK DlgProcOptionsProtos(....)
  2. {
  3.   ...
  4.   UINT64 newItem = 0;
  5.   ...
  6.   newItem = ListView_InsertItem(hwndList, &item);
  7.   if(newItem >= 0)
  8.     ListView_SetCheckState(....);
  9.   ...
  10. }
  11.  
  12. This suspicious code was found in Miranda IM project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V547 Expression 'newItem >= 0' is always true. Unsigned type value is always >= 0.  avs  options.cpp  265
  15.  
  16. 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