PVS-StudioWarnings

PVS-Studio warning V530 for ITK

Nov 24th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. template <typename TInputImage, typename TOutputImage>
  2. void
  3. PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
  4. ::EmptyCaches()
  5. {
  6.   for (unsigned int threadId = 0;
  7.        threadId < m_ThreadData.size(); ++threadId)
  8.     {
  9.     SizeValueType cacheSize = ....;
  10.     for (SizeValueType c = 0; c < cacheSize; ++c)
  11.       {
  12.       delete m_ThreadData[threadId].eigenValsCache[c];
  13.       delete m_ThreadData[threadId].eigenVecsCache[c];
  14.       }
  15.     m_ThreadData[threadId].eigenValsCache.empty();
  16.     m_ThreadData[threadId].eigenVecsCache.empty();
  17.     }
  18. }
  19.  
  20. This suspicious code was found in ITK project by PVS-Studio static code analyzer.
  21. Warning message is:
  22. V530 The return value of function 'empty' is required to be utilized. itkpatchbaseddenoisingimagefilter.hxx 85
  23.  
  24. 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