[PATCH] ice/base: fix gcc 12 warning stringop-overflow

David Marchand david.marchand at redhat.com
Thu Jun 16 16:29:15 CEST 2022


Title should start with net/ice/base:.

On Thu, Jun 16, 2022 at 12:35 PM <wenxuanx.wu at intel.com> wrote:
>
> From: Wenxuan Wu <wenxuanx.wu at intel.com>
>
> Gcc with -O2 flag, would retrieve the value in one time.
> This patch changed the type of fv_idx in struct ice_recp_grp_entry to
> align with its callers which is also u8 type.
>
> When u8 idx[5] = a value u16 index[4], gcc12 would give this warning,
> because it is not big enough to store the bytes(bigger than 5 bytes)
> in one time (-O2 would do it in this way).
>
> Fixes: 04b8ec1ea807 ("net/ice/base: add protocol structures and defines")
> Cc: stable at dpdk.org
Missing empty line.

> Signed-off-by: Wenxuan Wu <wenxuanx.wu at intel.com>

Only build tested.
Tested-by: David Marchand <david.marchand at redhat.com>


-- 
David Marchand



More information about the stable mailing list