Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
Examples of errors detected by the V558…

Examples of errors detected by the V558 diagnostic

V558. Function returns pointer/reference to temporary local object.


SeqAn

V558 Function returns the reference to temporary local object: before. iter_concat_virtual.h 277


template <typename TStringSet, typename TSpec>
inline Iter<TStringSet, ConcatVirtual<TSpec> > const &
operator++(Iter<TStringSet, ConcatVirtual<TSpec> > & me, int)
{
    Iter<TStringSet, ConcatVirtual<TSpec> > before = me;
    goNext(me);
    return before;
}

Similar errors can be found in some other places:

  • V558 Function returns the reference to temporary local object: before. iter_concat_virtual.h 310

VirtualDub

V558 Function returns the reference to temporary local object: tmp. VirtualDub vdstl.h 460


vdlist_iterator& operator--(int) {
  vdlist_iterator tmp(*this);
  mp = mp->mListNodePrev;
  return tmp;
}

Geant4 software

V558 Function returns the reference to temporary local object: rprim. G4GMocren g4gmocrenio.cc 131


template <typename T> GMocrenDataPrimitive<T> &
GMocrenDataPrimitive<T>::operator + (
  const GMocrenDataPrimitive<T> & _right)
{
  GMocrenDataPrimitive<T> rprim;
  ....
  return rprim;
}

LLVM/Clang

V558 Function returns the reference to temporary local object: res. LiveInterval.h 679


SingleLinkedListIterator<T> &operator++(int) {
  SingleLinkedListIterator res = *this;
  ++*this;
  return res;
}

EFL Core Libraries

V558 Function returns the reference to temporary local object: tmp. eina_accessor.hh 519


accessor_iterator<T>& operator++(int)
{
  accessor_iterator<T> tmp(*this);
  ++*this;
  return tmp;
}

Similar errors can be found in some other places:

  • V558 Function returns the reference to temporary local object: tmp. eina_accessor.hh 535
  • V558 Function returns the reference to temporary local object: tmp. eina_accessor.hh 678
  • V558 Function returns the reference to temporary local object: tmp. eina_accessor.hh 694

Android

V558 CWE-562 Function returns the reference to temporary local object: tmp. transform_iterator.h 77


TransformIterator& operator++(int) {
  TransformIterator tmp(*this);
  ++*this;
  return tmp;
}

Android

V558 CWE-562 Function returns the reference to temporary local object: tmp. transform_iterator.h 92


TransformIterator& operator--(int) {
  TransformIterator tmp(*this);
  --*this;
  return tmp;
}

close form

Fill out the form in 2 simple steps below:

Your contact information:

Step 1
Congratulations! This is your promo code!

Desired license type:

Step 2
Team license
Enterprise license
** By clicking this button you agree to our Privacy Policy statement
close form
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
* By clicking this button you agree to our Privacy Policy statement

close form
Free PVS‑Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

close form
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

close form
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

close form
check circle
Message submitted.

Your message has been sent. We will email you at


If you do not see the email in your inbox, please check if it is filtered to one of the following folders:

  • Promotion
  • Updates
  • Spam