PVS-StudioWarnings

PVS-Studio warning V519 for ITK

Nov 19th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. template<typename LayerType, typename TTargetVector>
  2. QuickPropLearningRule <LayerType,TTargetVector>
  3. ::QuickPropLearningRule()
  4. {
  5.   m_Momentum = 0.9; //Default
  6.   m_Max_Growth_Factor = 1.75;
  7.   m_Decay = -0.0001;
  8.   m_SplitEpsilon = 1;
  9.   m_Epsilon = 0.55;
  10.   m_Threshold = 0.0;
  11.   m_SigmoidPrimeOffset = 0;
  12.   m_SplitEpsilon = 0;
  13. }
  14.  
  15. This suspicious code was found in ITK project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V519 The 'm_SplitEpsilon' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 35, 39. itkquickproplearningrule.hxx 39
  18.  
  19. 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