summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-02-25 00:01:26 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-02-26 02:27:16 +0200
commit4849a84a9bf3577435ba7e9bc39a8ff5d8960e6e (patch)
tree264e38e8c062e3a6e2d140f77f59ba0422bcb51f
parent005d19a73fb5d9813e924c26f010e0117fc47568 (diff)
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
-rw-r--r--meson.build4
1 files changed, 3 insertions, 1 deletions
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++'