[PATCH v2] app/testpmd: fix flex item compilation error

Thomas Monjalon thomas at monjalon.net
Tue Feb 21 21:09:34 CET 2023


21/02/2023 11:02, Rongwei Liu:
> When configuring meson with option "--optimization=1", gcc
> complains "maybe-uninitialized" warning and it was treated as
> error since Werror is enabled.
> 
> Assign fp to NULL at declaration can avoid this.

That's probably a false positive,
but I'm OK to workaround it this way, especially in a test application.

> Bugzilla ID: 1163
> Fixes: c8e25fbf1440 ("ethdev: add flow flex modify")
> Cc: stable at dpdk.org
> 
> Reported-by: gaodaxue <daxuex.gao at intel.com>
> Signed-off-by: Rongwei Liu <rongweil at nvidia.com>
> ---
> -	struct flex_item *fp;
> +	struct flex_item *fp = NULL;

Applied, thanks.




More information about the stable mailing list