[dpdk-stable] [PATCH V2 3/3] eal/x86: avoid cast-align warning in x86 memcpy functions
Thomas Monjalon
thomas at monjalon.net
Mon Oct 25 17:29:05 CEST 2021
21/10/2021 10:51, Eli Britstein:
> Functions and macros in x86 rte_memcpy.h may cause cast-align warnings,
> when using strict cast align flag with supporting gcc:
> gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
> CFLAGS="-Wcast-align=strict" make V=1 -C examples/l2fwd clean static
>
> For example:
> In file included from main.c:24:
> /dpdk/build/include/rte_memcpy.h: In function 'rte_mov16':
> /dpdk/build/include/rte_memcpy.h:306:25: warning: cast increases
> required alignment of target type [-Wcast-align]
> 306 | xmm0 = _mm_loadu_si128((const __m128i *)src);
> | ^
>
> As the code assumes correct alignment, add first a (void *) or (const
> void *) castings, to avoid the warnings.
>
> Fixes: 9484092baad3 ("eal/x86: optimize memcpy for AVX512 platforms")
> Cc: stable at dpdk.org
>
> Signed-off-by: Eli Britstein <elibr at nvidia.com>
Series applied, thanks.
More information about the stable
mailing list