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>
This commit is contained in:
Laurent Pinchart 2025-02-25 00:01:26 +02:00
parent 005d19a73f
commit 4849a84a9b

View file

@ -110,7 +110,9 @@ common_arguments = [
] ]
c_arguments = [] c_arguments = []
cpp_arguments = [] cpp_arguments = [
'-Wnon-virtual-dtor',
]
cxx_stdlib = 'libstdc++' cxx_stdlib = 'libstdc++'