mbuf: fix explicit cast to build C++ app

When DPDK is being compiled in C++ project using g++ then
'invalid conversion from' error appears. Added explicit
typecast on function return to get rid of the error.

Fixes: 7755baae8378 ("mbuf: silence warning on pointer arithmetic")

Signed-off-by: Sergey Balabanov <balabanovsv@ecotelecom.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
Sergey Balabanov 2015-08-12 12:11:04 +03:00 committed by Thomas Monjalon
parent 5a93d158fb
commit a42eb3d508

View File

@ -882,7 +882,7 @@ static inline uint16_t rte_pktmbuf_priv_size(struct rte_mempool *mp);
static inline struct rte_mbuf *
rte_mbuf_from_indirect(struct rte_mbuf *mi)
{
return RTE_PTR_SUB(mi->buf_addr, sizeof(*mi) + mi->priv_size);
return (struct rte_mbuf *)RTE_PTR_SUB(mi->buf_addr, sizeof(*mi) + mi->priv_size);
}
/**