[PATCH 2/2] meson: Enable the -Wnon-virtual-dtor compiler option
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Feb 24 23:04:38 CET 2025
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 <laurent.pinchart at ideasonboard.com>
---
meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 5270f626f2fb..f8d32dcf8d7a 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++'
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list