To get a trial key
fill out the form below
Team License (standard version)
Enterprise License (extended version)
* By clicking this button you agree to our Privacy Policy statement

** This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
GBP
RUB
* By clicking this button you agree to our Privacy Policy statement

** This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
Examples of errors detected by the V603…

Examples of errors detected by the V603 diagnostic

April 5, 2021

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


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;
  }
  ....
};

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->Expr::Expr(....)' should be used. module.h 157

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);
}

EA WebKit

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


struct ScrollAnchorData {
  WebString selector_;
  WebFloatPoint offset_;
  uint64_t simhash_;

  ScrollAnchorData(const WebString& selector,
                   const WebFloatPoint& offset,
                   uint64_t simhash)
    : selector_(selector), offset_(offset), simhash_(simhash) {}

  ScrollAnchorData() {
    ScrollAnchorData(WebString(), WebFloatPoint(0, 0), 0); }
};

This is not a call of one constructor from another one. An unnamed object is created and is immediately removed.


Android

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


struct HearingDevice {
  ....
  HearingDevice() { HearingDevice(RawAddress::kEmpty, false); }
  ....
};

Azure Service Fabric

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


class JsonBufferManager2
{
    template<typename T>
    friend struct JsonBufferManagerTraits;
public:
    JsonBufferManager2()
    {
        JsonBufferManager2(nullptr, 0);
    }
    ....
}

Etc2Comp

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


Block4x4::Block4x4(void)
{
  m_pimageSource = nullptr;
  m_uiSourceH = 0;
  m_uiSourceV = 0;

  m_sourcealphamix = SourceAlphaMix::UNKNOWN;
  m_boolBorderPixels = false;
  m_boolPunchThroughPixels = false;

  m_pencoding = nullptr;

  m_errormetric = ErrorMetric::NUMERIC;
}

void Block4x4::InitFromSource(Image *a_pimageSource,
  unsigned int a_uiSourceH, unsigned int a_uiSourceV,
  unsigned char *a_paucEncodingBits,
  ErrorMetric a_errormetric)
{
  Block4x4();                            // <=

  m_pimageSource = a_pimageSource;
  m_uiSourceH = a_uiSourceH;
  m_uiSourceV = a_uiSourceV;
  m_errormetric = a_errormetric;
  ....
}

Similar errors can be found in some other places:

  • V603 CWE-665 The object was created but it is not being used. If you wish to call constructor, 'this->Block4x4::Block4x4(....)' should be used. EtcBlock4x4.cpp 199

NCBI Genome Workbench

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


//This struct keeps the result of comparison of two exons
struct SIntervalComparisonResult : CObject
{
public:
  SIntervalComparisonResult(unsigned pos1, unsigned pos2,
                            FCompareLocs result, int pos_comparison = 0)
  : m_exon_ordinal1(pos1), m_exon_ordinal2(pos2),
    m_result(result), m_position_comparison(pos_comparison) {}

  SIntervalComparisonResult()
  {
    SIntervalComparisonResult(0, 0, fCmp_Unknown, 0);
  }
  ....
};

Stellarium

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


Plane::Plane(Vec3f &v1, Vec3f &v2, Vec3f &v3)
  : distance(0.0f), sDistance(0.0f)
{
  Plane(v1, v2, v3, SPolygon::CCW);
}

Haiku Operation System

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


int8
BUnicodeChar::Type(uint32 c)
{
  BUnicodeChar();
  return u_charType(c);
}

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->BUnicodeChar::BUnicodeChar(....)' should be used. UnicodeChar.cpp 37
  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->BUnicodeChar::BUnicodeChar(....)' should be used. UnicodeChar.cpp 49
  • V603 The object was created but it is not being used. If you wish to call constructor, 'this->BUnicodeChar::BUnicodeChar(....)' should be used. UnicodeChar.cpp 58
  • And 15 additional diagnostic messages.

Popular related articles
Technologies used in the PVS-Studio code analyzer for finding bugs and potential vulnerabilities

Date: 11.21.2018

Author: Andrey Karpov

A brief description of technologies used in the PVS-Studio tool, which let us effectively detect a large number of error patterns and potential vulnerabilities. The article describes the implementati…
The way static analyzers fight against false positives, and why they do it

Date: 03.20.2017

Author: Andrey Karpov

In my previous article I wrote that I don't like the approach of evaluating the efficiency of static analyzers with the help of synthetic tests. In that article, I give the example of a code fragment…
How PVS-Studio Proved to Be More Attentive Than Three and a Half Programmers

Date: 10.22.2018

Author: Andrey Karpov

Just like other static analyzers, PVS-Studio often produces false positives. What you are about to read is a short story where I'll tell you how PVS-Studio proved, just one more time, to be more atte…
The Ultimate Question of Programming, Refactoring, and Everything

Date: 04.14.2016

Author: Andrey Karpov

Yes, you've guessed correctly - the answer is "42". In this article you will find 42 recommendations about coding in C++ that can help a programmer avoid a lot of errors, save time and effort. The au…
PVS-Studio for Java

Date: 01.17.2019

Author: Andrey Karpov

In the seventh version of the PVS-Studio static analyzer, we added support of the Java language. It's time for a brief story of how we've started making support of the Java language, how far we've co…
The Last Line Effect

Date: 05.31.2014

Author: Andrey Karpov

I have studied many errors caused by the use of the Copy-Paste method, and can assure you that programmers most often tend to make mistakes in the last fragment of a homogeneous code block. I have ne…
Static analysis as part of the development process in Unreal Engine

Date: 06.27.2017

Author: Andrey Karpov

Unreal Engine continues to develop as new code is added and previously written code is changed. What is the inevitable consequence of ongoing development in a project? The emergence of new bugs in th…
Free PVS-Studio for those who develops open source projects

Date: 12.22.2018

Author: Andrey Karpov

On the New 2019 year's eve, a PVS-Studio team decided to make a nice gift for all contributors of open-source projects hosted on GitHub, GitLab or Bitbucket. They are given free usage of PVS-Studio s…
PVS-Studio ROI

Date: 01.30.2019

Author: Andrey Karpov

Occasionally, we're asked a question, what monetary value the company will receive from using PVS-Studio. We decided to draw up a response in the form of an article and provide tables, which will sho…
The Evil within the Comparison Functions

Date: 05.19.2017

Author: Andrey Karpov

Perhaps, readers remember my article titled "Last line effect". It describes a pattern I've once noticed: in most cases programmers make an error in the last line of similar text blocks. Now I want t…

Comments (0)

Next comments

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site.
Learn More →
Accept