build+src: mark destructor virtual in classes with virtual functions
And to prevent similar mistakes in the future, add -Wnon-virtual-dtor
to the default build flags.
Change-Id: I28e2361341abab29fca134309288cd259736d67a
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 2999e8f..13de263 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -106,6 +106,7 @@
'-Wall',
'-Wextra',
'-Werror',
+ '-Wnon-virtual-dtor',
'-Wno-unused-parameter',
'-Wno-error=maybe-uninitialized', # Bug #1615
'-Wno-error=deprecated-declarations', # Bug #3795
@@ -119,6 +120,7 @@
'-pedantic',
'-Wall',
'-Wextra',
+ '-Wnon-virtual-dtor',
'-Wno-unused-parameter',
]
return flags