[PATCH 10/10] meson: Enable warnings to flag missing declarations
Kieran Bingham
kieran.bingham at ideasonboard.com
Mon Jun 24 23:45:21 CEST 2024
Quoting Laurent Pinchart (2024-06-24 20:29:41)
> A recently introduced typo resulted in a function definition not
> matching its declaration. As the problem occurred in libipa, and IPA
> modules are loaded dynamically and are linked with lazy symbol
> resolution, the problem wasn't caught at build time.
>
> To try and catch future similar issues, enable the
> -Wmissing-declarations warning.
>
> Suggested-by: Barnabás Pőcze <pobrn at protonmail.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> meson.build | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meson.build b/meson.build
> index 0ef4cdaafd76..2acd8c3e8cfe 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -95,6 +95,7 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR
> endif
>
> common_arguments = [
> + '-Wmissing-declarations',
I love any opportunity that lets the tools protect us from ourselves...
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> '-Wshadow',
> '-include', meson.current_build_dir() / 'config.h',
> ]
> --
> Regards,
>
> Laurent Pinchart
>
More information about the libcamera-devel
mailing list