a3f8d05871
In rte_vlan_insert there is a casting of rte_pktmbuf_prepend returned
value to (struct rte_ether_hdr *), which causes cast-align warning 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
In file included from main.c:35:
/dpdk/build/include/rte_ether.h:370:7: warning: cast increases required
alignment of target type [-Wcast-align]
370 | nh = (struct rte_ether_hdr *)
| ^
As the code assumes correct alignment, add first a (void *) casting, to
avoid the warning.
Fixes:
|
||
---|---|---|
.. | ||
meson.build | ||
net_crc_avx512.c | ||
net_crc_neon.c | ||
net_crc_sse.c | ||
net_crc.h | ||
rte_arp.c | ||
rte_arp.h | ||
rte_ecpri.h | ||
rte_esp.h | ||
rte_ether.c | ||
rte_ether.h | ||
rte_geneve.h | ||
rte_gre.h | ||
rte_gtp.h | ||
rte_higig.h | ||
rte_icmp.h | ||
rte_ip.h | ||
rte_l2tpv2.h | ||
rte_mpls.h | ||
rte_net_crc.c | ||
rte_net_crc.h | ||
rte_net.c | ||
rte_net.h | ||
rte_ppp.h | ||
rte_sctp.h | ||
rte_tcp.h | ||
rte_udp.h | ||
rte_vxlan.h | ||
version.map |