From 2ce0c835713d98d149f2f2beacd643e9e590d40d Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Tue, 31 Aug 2021 13:30:05 +0800 Subject: [PATCH] Fix cast align warning (#894) Signed-off-by: Ze Gan --- vslib/TrafficForwarder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vslib/TrafficForwarder.cpp b/vslib/TrafficForwarder.cpp index 3f077c6eb4ec..0c867a8a9b35 100644 --- a/vslib/TrafficForwarder.cpp +++ b/vslib/TrafficForwarder.cpp @@ -37,7 +37,7 @@ bool TrafficForwarder::addVlanTag( if (cmsg->cmsg_level != SOL_PACKET || cmsg->cmsg_type != PACKET_AUXDATA) continue; - struct tpacket_auxdata* aux = (struct tpacket_auxdata*)CMSG_DATA(cmsg); + struct tpacket_auxdata* aux = (struct tpacket_auxdata*)(void *)CMSG_DATA(cmsg); if ((aux->tp_status & TP_STATUS_VLAN_VALID) && (aux->tp_status & TP_STATUS_VLAN_TPID_VALID))