From 4849a84a9bf3577435ba7e9bc39a8ff5d8960e6e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 25 Feb 2025 00:01:26 +0200 Subject: meson: Enable the -Wnon-virtual-dtor compiler option A base class with virtual functions and a non-virtual public destructor is prone to undefined behaviourif deleted from a pointer to the base. Enable the -Wnon-virtual-dtor warning to report those issues. Signed-off-by: Laurent Pinchart Reviewed-by: Milan Zamazal Reviewed-by: Stefan Klug --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5270f626..f8d32dcf 100644 --- a/meson.build +++ b/meson.build @@ -110,7 +110,9 @@ common_arguments = [ ] c_arguments = [] -cpp_arguments = [] +cpp_arguments = [ + '-Wnon-virtual-dtor', +] cxx_stdlib = 'libstdc++' -- cgit v1.2.1