PVS-StudioWarnings

PVS-Studio warning V599 for Virtualdub

Nov 19th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1. class VDDialogBaseW32 {
  2.   ....
  3.   ~VDDialogBaseW32();
  4.   ....
  5.   virtual INT_PTR DlgProc(....) = 0;
  6.   virtual bool PreNCDestroy();
  7.   ....
  8. }
  9.  
  10. class VDDialogAudioFilterFormatConvConfig :
  11.   public VDDialogBaseW32
  12. { .... };
  13.  
  14. INT_PTR CALLBACK VDDialogBaseW32::StaticDlgProc(....) {
  15.   VDDialogBaseW32 *pThis =
  16.     (VDDialogBaseW32 *)GetWindowLongPtr(hwnd, DWLP_USER);
  17.   ....
  18.   delete pThis;
  19.   ....
  20. }
  21.  
  22. This suspicious code was found in Virtualdub project by PVS-Studio static code analyzer.
  23. Warning message is:
  24. V599 The destructor was not declared as a virtual one, although the 'VDDialogBaseW32' class contains virtual functions. VirtualDub gui.cpp 997
  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