PVS-StudioWarnings

PVS-Studio warning V558 for SeqAn

Nov 19th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. template <typename TStringSet, typename TSpec>
  2. inline Iter<TStringSet, ConcatVirtual<TSpec> > const &
  3. operator++(Iter<TStringSet, ConcatVirtual<TSpec> > & me, int)
  4. {
  5.     Iter<TStringSet, ConcatVirtual<TSpec> > before = me;
  6.     goNext(me);
  7.     return before;
  8. }
  9.  
  10. This suspicious code was found in SeqAn project by PVS-Studio static code analyzer.
  11. Warning message is:
  12. V558 Function returns the reference to temporary local object: before. iter_concat_virtual.h 277
  13.  
  14. 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