mbuf: silence warning on pointer arithmetic
authorCyril Chemparathy <cchemparathy@ezchip.com>
Mon, 22 Jun 2015 18:34:16 +0000 (11:34 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 24 Jun 2015 10:00:41 +0000 (12:00 +0200)
commit7755baae8378671d5b5a74990ca359c07f227826
treef67e8565d7031682c5f99fad46f8c5a1d4a9a1be
parent6cf14ce4ce6cb8a9a26c20769f20a8bf34a4491f
mbuf: silence warning on pointer arithmetic

Translating from an mbuf element to the mbuf pointer does not break alignment
constraints.  However, the compiler is unaware of this fact and complains on
-Wcast-align.  This patch modifies the code to use RTE_PTR_SUB(), thereby
silencing the compiler by casting through (void *).

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf.h