Advertisement
PVS-StudioWarnings

PVS-Studio warning V603 for eMulePlus

Nov 25th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1. class CSlideBarGroup
  2. {
  3. public:
  4.   CSlideBarGroup(CString strName = _T(""),
  5.                  INT iIconIndex = -1,
  6.                  CListBoxST* pListBox = NULL);
  7.   CSlideBarGroup(CSlideBarGroup& Group);
  8.   ~CSlideBarGroup();
  9.  
  10. private:
  11.   CString  m_strName;
  12.   CListBoxST* m_pListBox;
  13.   int   m_iIconIndex; // icon index for the image list
  14.   ...
  15. }
  16.  
  17. CSlideBarGroup::CSlideBarGroup(CString strName,
  18.   INT iIconIndex, CListBoxST* pListBox)
  19.   : m_strName(strName)
  20.   , m_iIconIndex(iIconIndex)
  21.   , m_pListBox(pListBox)
  22. {
  23. }
  24.  
  25. CSlideBarGroup::CSlideBarGroup(CSlideBarGroup& Group)
  26. {
  27.   CSlideBarGroup(
  28.    Group.GetName(), Group.GetIconIndex(),
  29.    Group.GetListBox());
  30. }
  31.  
  32. This suspicious code was found in eMulePlus project by PVS-Studio static code analyzer.
  33. Warning message is:
  34. V603 The object was created but it is not being used. If you wish to call in-place constructor, 'new (this) CSlideBarGroup(....)' should be used. emule slidebar.cpp 18
  35.  
  36. 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