[libcamera-devel] [PATCH 1/2] meson: Enable Wunused-parameter to catch unused parameters

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Aug 5 13:02:13 CEST 2021


Hi Umang,

Thank you for the patch.

On Thu, Aug 05, 2021 at 02:05:50PM +0530, Umang Jain wrote:
> Functions paramters either needs to be used or marked with
> [[maybe_unused]]. Neither of them should be flagged during
> compilation.

This is already enabled, through the warning_level=2 default option,
which sets -Wall and -Wextra.

> Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
> ---
>  meson.build | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meson.build b/meson.build
> index a49c484f..e555034b 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -43,6 +43,7 @@ endif
>  
>  common_arguments = [
>      '-Wshadow',
> +    '-Wunused-parameter',
>      '-include', 'config.h',
>  ]
>  

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list