Message ID | 20250224220438.21512-3-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Commit | 4849a84a9bf3577435ba7e9bc39a8ff5d8960e6e |
Headers | show |
Series |
|
Related | show |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes: > 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> > --- > 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++'
Hi Laurent, Thank you for the patch. On Tue, Feb 25, 2025 at 12:04:38AM +0200, Laurent Pinchart wrote: > 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: Stefan Klug <stefan.klug@ideasonboard.com> Cheers, Stefan > --- > 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 >
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++'
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> --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)