forked from kevintraynor/dpdk-stable-queue-1811
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eal/x86: avoid cast-align warning in memcpy functions
[ upstream commit 6de430b ] 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: 9484092 ("eal/x86: optimize memcpy for AVX512 platforms") Signed-off-by: Eli Britstein <elibr@nvidia.com>
- Loading branch information
1 parent
6c88235
commit 545b8e9
Showing
1 changed file
with
44 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters