> -----Original Message-----
> From: dev <[email protected]> On Behalf Of Thomas Monjalon
> Sent: Sunday, August 8, 2021 8:52 PM
> To: [email protected]
> Cc: [email protected]; [email protected]; Ori Kam
> <[email protected]>
> Subject: [dpdk-dev] [PATCH v3 2/5] regex/mlx5: fix minsize build
> 
> Error occurs when configuring meson with --buildtype=minsize with GCC
> 11.1.0:
> 
> drivers/regex/mlx5/mlx5_regex_fastpath.c:398:17: error:
> ‘len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> |                 complete_umr_wqe(qp, sq, &qp->jobs[mkey_job_id], sq->pi,
> |
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> |                                  klm_num, len);
> |                                  ~~~~~~~~~~~~~
> drivers/regex/mlx5/mlx5_regex_fastpath.c:315:31: note: ‘len’ was declared
> here
> |         uint32_t klm_num = 0, len;
> |                               ^~~
> 
> Signed-off-by: Thomas Monjalon <[email protected]>
> ---
>  drivers/regex/mlx5/mlx5_regex_fastpath.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c
> b/drivers/regex/mlx5/mlx5_regex_fastpath.c
> index 786718af53..c79445ce7d 100644
> --- a/drivers/regex/mlx5/mlx5_regex_fastpath.c
> +++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c
> @@ -312,7 +312,8 @@ prep_regex_umr_wqe_set(struct mlx5_regex_priv
> *priv, struct mlx5_regex_qp *qp,
>       struct mlx5_regex_job *job = NULL;
>       size_t sqid = sq->sqn, mkey_job_id = 0;
>       size_t left_ops = nb_ops;
> -     uint32_t klm_num = 0, len;
> +     uint32_t klm_num = 0;
> +     uint32_t len = 0;
>       struct mlx5_klm *mkey_klm = NULL;
>       struct mlx5_klm klm;
> 
> --
> 2.31.1
Reviewed-by: Ruifeng Wang <[email protected]>

Reply via email to