Advertisement
PVS-StudioWarnings

PVS-Studio warning V571 for SeqAn

Nov 25th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. void convertMatchesToGlobalAlignment(....)
  2. {
  3.   ....
  4.   TContigPos rBegin = _min((*j).beginPos, (*j).endPos);
  5.   TContigPos rEnd = _max((*j).beginPos, (*j).endPos);
  6.   if (rBegin < insPos && insPos < rEnd)
  7.   {
  8.     if (rBegin < insPos)
  9.     {
  10.       TReadGaps gaps(....);
  11.       insertGap(gaps, insPos - rBegin);
  12.     } else
  13.     {
  14.       if ((*j).beginPos < (*j).endPos)
  15.         ++(*j).beginPos;
  16.       else
  17.         ++(*j).endPos;
  18.     }
  19.   ....
  20. }
  21.  
  22. This suspicious code was found in SeqAn project by PVS-Studio static code analyzer.
  23. Warning message is:
  24. V571 Recurring check. The 'rBegin < insPos' condition was already verified in line 2073. store_all.h 2079
  25.  
  26. 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