[0/3] Avoid cast-align warnings

Message ID 20210713064910.12793-1-elibr@nvidia.com (mailing list archive)


Eli Britstein July 13, 2021, 6:49 a.m. UTC
  Various functions/macros assume valid alignment for casting. Compiling
an application against it with -Werror and -Wcast-align may trigger
cast-align warnings.
To avoid those, add first (void *) castings.

Note: for eal/arm64 similar changes could be applied to
lib/eal/arm/include/rte_memcpy_64.h. I do not have a system in which I
encounter such warnings, so currently I do not post any change for it.

Eli Britstein (3):
  net: avoid cast-align warning in VLAN insert function
  mbuf: avoid cast-align warning in pktmbuf mtod offset macro
  eal/x86: avoid cast-align warning in x86 memcpy functions

 lib/eal/x86/include/rte_memcpy.h | 80 ++++++++++++++++++--------------
 lib/mbuf/rte_mbuf_core.h         |  2 +-
 lib/net/rte_ether.h              |  2 +-
 3 files changed, 46 insertions(+), 38 deletions(-)