@@ -122,7 +122,7 @@ static inline int odph_process_l4_hdr(odp_packet_t odp_pkt,
* should come from the udp header, unlike for TCP where is
* derived. */
l4_len = odp_be_to_cpu_16(udp_hdr_ptr->length);
- pkt_chksum_ptr = &udp_hdr_ptr->chksum;
+ pkt_chksum_ptr = (uint16_t *)(void *)&udp_hdr_ptr->chksum;
pkt_chksum_offset = l4_offset + offsetof(odph_udphdr_t, chksum);
} else if (odp_packet_has_tcp(odp_pkt)) {
tcp_hdr_ptr = (odph_tcphdr_t *)l4_ptr;
@@ -133,7 +133,7 @@ static inline int odph_process_l4_hdr(odp_packet_t odp_pkt,
tcp_hdr_ptr = &tcp_hdr;
}
- pkt_chksum_ptr = &tcp_hdr_ptr->cksm;
+ pkt_chksum_ptr = (uint16_t *)(void *)&tcp_hdr_ptr->cksm;
pkt_chksum_offset = l4_offset + offsetof(odph_tcphdr_t, cksm);
is_tcp = true;
} else {
@@ -197,7 +197,7 @@ static inline int odph_process_l3_hdr(odp_packet_t odp_pkt,
ipv4_hdr_ptr = &ipv4_hdr;
}
- addrs_ptr = (uint16_t *)&ipv4_hdr_ptr->src_addr;
+ addrs_ptr = (uint16_t *)(void *)&ipv4_hdr_ptr->src_addr;
addrs_len = 2 * ODPH_IPV4ADDR_LEN;
protocol = ipv4_hdr_ptr->proto;
l3_len = odp_be_to_cpu_16(ipv4_hdr_ptr->tot_len);
@@ -18,7 +18,7 @@
odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); \
if (packet_parse_not_complete(pkt_hdr)) \
packet_parse_full(pkt_hdr); \
- pkt_hdr->p.x = v & 1; \
+ pkt_hdr->p.x = (v) & 1; \
} while (0)
int odp_packet_has_error(odp_packet_t pkt)