PVS-StudioWarnings

PVS-Studio warning V517 for ITK

Nov 19th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. template< typename T >
  2. void WriteCellDataBufferAsASCII(....)
  3. {
  4.   ....
  5.   if( this->m_NumberOfCellPixelComponents == 3 )
  6.   {
  7.     ....
  8.   }
  9.   else if( this->m_NumberOfCellPixelComponents == 3 )
  10.   {
  11.     ....
  12.   }
  13.   ....
  14. }
  15.  
  16. This suspicious code was found in ITK project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 948, 968. itkvtkpolydatameshio.h 948
  19.  
  20. 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