Examples of errors detected by the V603 diagnostic.


V603. The object was created but it is not being used. If you wish to call constructor, 'this->Foo::Foo(....)' should be used.


eMule Plus

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


class CSlideBarGroup
{
public:
  CSlideBarGroup(CString strName = _T(""),
                 INT iIconIndex = -1,
                 CListBoxST* pListBox = NULL);
  CSlideBarGroup(CSlideBarGroup& Group);
  ~CSlideBarGroup();

private:
  CString  m_strName;
  CListBoxST* m_pListBox;
  int   m_iIconIndex; // icon index for the image list
  ...
}

CSlideBarGroup::CSlideBarGroup(CString strName,
  INT iIconIndex, CListBoxST* pListBox)
  : m_strName(strName)
  , m_iIconIndex(iIconIndex)
  , m_pListBox(pListBox)
{
}

CSlideBarGroup::CSlideBarGroup(CSlideBarGroup& Group)
{
  CSlideBarGroup(
   Group.GetName(), Group.GetIconIndex(),
   Group.GetListBox());
}

Trans-Proteomic Pipeline

V603 The object was created but it is not being used. If you wish to call constructor, 'this->ExperimentCycleRecord::ExperimentCycleRecord(....)' should be used. Mascot2XML mascotconverter.cxx 101


class ExperimentCycleRecord {
public:
  ExperimentCycleRecord() {
    ExperimentCycleRecord(0,0,0,True,False);
  }
  ...
}

Similar errors can be found in some other places:

  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->ASAPRatioPeptideCGIDisplayParser::ASAPRatioPeptideCGIDisplayParser(....)' should be used. tpplib asapratiopeptidecgidisplayparser.cxx 36
  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->ASAPRatioPeptideParser::ASAPRatioPeptideParser(....)' should be used. tpplib asapratiopeptideparser.cxx 57
  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->CruxDiscrimFunction::CruxDiscrimFunction(....)' should be used. tpplib cruxdiscrimfunction.cxx 36
  • And 5 additional diagnostic messages.

Trans-Proteomic Pipeline

V603 The object was created but it is not being used. If you wish to call constructor, 'this->ExperimentCycleRecord::ExperimentCycleRecord(....)' should be used. mascotconverter.cxx 101


class ExperimentCycleRecord {
public:
  ExperimentCycleRecord() {
    ExperimentCycleRecord(0,0,0,True,False);
  }
  ExperimentCycleRecord(long lExperiment, long lCycleStart,
                        long lCycleEnd, Boolean bSingleCycle,
                        Boolean bRangleCycle)
  {
    ....
  }
  ....
}

Similar errors can be found in some other places:

  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->ASAPRatioPeptideParser::ASAPRatioPeptideParser(....)' should be used. asapratiopeptideparser.cxx 57
  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->ASAPRatioPeptideCGIDisplayParser::ASAPRatioPeptideCGIDisplayParser(....)' should be used. asapratiopeptidecgidisplayparser.cxx 36
  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->CruxDiscrimFunction::CruxDiscrimFunction(....)' should be used. cruxdiscrimfunction.cxx 36
  • And 6 additional diagnostic messages.

OpenCOLLADA

V603 The object was created but it is not being used. If you wish to call constructor, 'this->ParserString::ParserString(....)' should be used. generatedsaxparsertypes.h 56


struct ParserString : public UnionString
{
  ParserString()
  {
    UnionString::str = 0;
    UnionString::length = 0;
  }

  ParserString(const int& val)
  {
    ParserString();
  }
};

Similar errors can be found in some other places:

  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->URI::URI(....)' should be used. colladabuuri.cpp 169
  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->URI::URI(....)' should be used. colladabuuri.cpp 180

Google-Breakpad

V603 The object was created but it is not being used. If you wish to call constructor, 'this->Expr::Expr(....)' should be used. module.h 146

V603 The object was created but it is not being used. If you wish to call constructor, 'this->Expr::Expr(....)' should be used. module.h 157


struct Expr {
  Expr(const UniqueString* ident, long offset, bool deref)
  {
    if (ident == ustr__empty()) {
      Expr();                            // <=
    } else {
      postfix_ = "";
      ident_ = ident;
      offset_ = offset;
      how_ = deref ? kExprSimpleMem : kExprSimple;
    }
  }

  Expr(string postfix) {
    if (postfix.empty()) {
      Expr();                            // <=
    } else {
      postfix_ = postfix;
      ident_ = NULL;
      offset_ = 0;
      how_ = kExprPostfix;
    }
  }

  Expr()
  {
    postfix_ = "";
    ident_ = NULL;
    offset_ = 0;
    how_ = kExprInvalid;
  }
  ....
};

LibreOffice

V603 The object was created but it is not being used. If you wish to call constructor, 'this->Guess::Guess(....)' should be used. guess.cxx 56


Guess::Guess()
{
  language_str = DEFAULT_LANGUAGE;
  country_str = DEFAULT_COUNTRY;
  encoding_str = DEFAULT_ENCODING;
}

Guess::Guess(const char * guess_str)
{
  Guess();
  ....
}

Similar errors can be found in some other places:

  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->Camera3D::Camera3D(....)' should be used. camera3d.cxx 46

ChakraCore

V603 The object was created but it is not being used. If you wish to call constructor, 'this->StringCopyInfo::StringCopyInfo(....)' should be used. stringcopyinfo.cpp 64


void StringCopyInfo::InstantiateForceInlinedMembers()
{
    AnalysisAssert(false);

    StringCopyInfo copyInfo;
    JavascriptString *const string = nullptr;
    wchar_t *const buffer = nullptr;

    (StringCopyInfo());                     // <=
    (StringCopyInfo(string, buffer));       // <=
    copyInfo.SourceString();
    copyInfo.DestinationBuffer();
}

Open X-Ray Engine

V603 The object was created but it is not being used. If you wish to call constructor, 'this->VertexCache::VertexCache(....)' should be used. vertexcache.cpp 6


BOOL CActor::net_Spawn(CSE_Abstract* DC)
{
  ....
  m_States.empty();
  ....
}

CryEngine V

V603 The object was created but it is not being used. If you wish to call constructor, 'this->SRenderingPassInfo::SRenderingPassInfo(....)' should be used. i3dengine.h 2589


SRenderingPassInfo()
  : pShadowGenMask(NULL)
  , nShadowSide(0)
  , nShadowLod(0)
  , nShadowFrustumId(0)
  , m_bAuxWindow(0)
  , m_nRenderStackLevel(0)
  , m_eShadowMapRendering(static_cast<uint8>(SHADOW_MAP_NONE))
  , m_bCameraUnderWater(0)
  , m_nRenderingFlags(0)
  , m_fZoomFactor(0.0f)
  , m_pCamera(NULL)
  , m_nZoomInProgress(0)
  , m_nZoomMode(0)
  , m_pJobState(nullptr)
{
  threadID nThreadID = 0;
  gEnv->pRenderer->EF_Query(EFQ_MainThreadList, nThreadID);
  m_nThreadID = static_cast<uint8>(nThreadID);
  m_nRenderFrameID = gEnv->pRenderer->GetFrameID();
  m_nRenderMainFrameID = gEnv->pRenderer->GetFrameID(false);
}

SRenderingPassInfo(threadID id)
{
  SRenderingPassInfo(); // <=
  SetThreadID(id);
}


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;
On our website we use a cookie to collect information of a technical nature.
If you do not agree, please leave the site. Learn More →
Do not show again