PVS-StudioWarnings

PVS-Studio warning V599 for WinMerge

Nov 18th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.89 KB | None | 0 0
  1. CompareOptions *m_pCompareOptions;
  2.  
  3. CDiffContext::~CDiffContext()
  4. {
  5.   ...
  6.   delete m_pCompareOptions;
  7.   ...
  8. }
  9.  
  10. class CompareOptions
  11. {
  12. public:
  13.   CompareOptions();
  14.   CompareOptions(const CompareOptions & options);
  15.   virtual void SetFromDiffOptions(const DIFFOPTIONS & options);
  16.  
  17.   enum WhitespaceIgnoreChoices m_ignoreWhitespace;
  18.   bool m_bIgnoreBlankLines;
  19.   bool m_bIgnoreCase;
  20.   bool m_bIgnoreEOLDifference;
  21. };
  22.  
  23. class DiffutilsOptions : public CompareOptions
  24. {
  25.   ...
  26. };
  27.  
  28. This suspicious code was found in WinMerge project by PVS-Studio static code analyzer.
  29. Warning message is:
  30. V599 The virtual destructor is not present, although the 'CompareOptions' class contains virtual functions. Merge diffcontext.cpp 90
  31.  
  32. 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