[libcamera-devel] [PATCH 8/8] meson: Enable -Wextra-semi for clang

Hirokazu Honda hiroh at chromium.org
Tue Oct 20 10:23:24 CEST 2020


On Tue, Oct 20, 2020 at 4:52 PM Laurent Pinchart
<laurent.pinchart at ideasonboard.com> wrote:
>
> Hi Hiro-san,
>
> Thank you for the patch.
>
> On Tue, Oct 20, 2020 at 02:29:05PM +0900, Hirokazu Honda wrote:
> > The option, -Wxtra-semi, helps developers to find unnecessary
>
> s/-Wxtra-semi/-Wextra-semi/
>
> > semicolons. This option is available with clang.
> >
> > Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
> > ---
> >  meson.build | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/meson.build b/meson.build
> > index de15cc1..480c861 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -64,6 +64,12 @@ if cc.get_id() == 'clang'
> >              '-stdlib=libc++',
> >          ]
> >      endif
> > +
> > +    if cc.has_argument('-Wextra-semi')
> > +       cpp_arguments += [
> > +           '-Wextra-semi',
> > +       ]
> > +    endif
>
> The flag has been supported by clang since v4.0.0, I think we can drop
> the has_arguments check. Apart from that,
>

Thanks, as clang 4.0.0 is released in March 2017, let's drop has_arguments.

Regards,
-Hiro
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> >  endif
> >
> >  if cc.get_id() == 'gcc'
>
> --
> Regards,
>
> Laurent Pinchart


More information about the libcamera-devel mailing list