diff options
Diffstat (limited to 'platform/linux-generic/odp_packet.c')
-rw-r--r-- | platform/linux-generic/odp_packet.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index c6a50bf84..ed5d81952 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -63,13 +63,22 @@ const _odp_packet_inline_offset_t _odp_packet_inline ODP_ALIGNED_CACHE = { #include <odp/visibility_end.h> -/* Check that invalid values are the same. Some versions of Clang have trouble - * with the strong type casting, and complain that these invalid values are not - * integral constants. */ +/* Check that invalid values are the same. Some versions of Clang and pedantic + * build have trouble with the strong type casting, and complain that these + * invalid values are not integral constants. + * + * Invalid values are required to be equal for _odp_buffer_is_valid() to work + * properly. */ #ifndef __clang__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpedantic" ODP_STATIC_ASSERT(ODP_PACKET_INVALID == 0, "Packet invalid not 0"); ODP_STATIC_ASSERT(ODP_BUFFER_INVALID == 0, "Buffer invalid not 0"); ODP_STATIC_ASSERT(ODP_EVENT_INVALID == 0, "Event invalid not 0"); +ODP_STATIC_ASSERT(ODP_PACKET_VECTOR_INVALID == 0, "Packet vector invalid not 0"); +ODP_STATIC_ASSERT(ODP_PACKET_TX_COMPL_INVALID == 0, "Packet TX completion invalid not 0"); +ODP_STATIC_ASSERT(ODP_TIMEOUT_INVALID == 0, "Timeout invalid not 0"); +#pragma GCC diagnostic pop #endif static inline odp_buffer_t packet_to_buffer(odp_packet_t pkt) @@ -2592,7 +2601,7 @@ static int packet_l4_chksum(odp_packet_hdr_t *pkt_hdr, } } - return pkt_hdr->p.flags.all_flags != 0; + return pkt_hdr->p.flags.all.error != 0; } /** |