mbuf: fix C++ build on void pointer cast
authorDavid Marchand <david.marchand@6wind.com>
Wed, 16 May 2018 11:10:40 +0000 (13:10 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 18 May 2018 11:20:49 +0000 (13:20 +0200)
commita2ff2827dc84b3acbb2270c49b4b0a82a09712cb
tree40f85e2e0d986c651a64e447d673a834ce4d7948
parent1613848c2cd109d525d60cb6e84c9b893ef0ccce
mbuf: fix C++ build on void pointer cast

Including rte_mbuf.h in C++ triggers the following warning as C++ does not
allow implicit casting of a void *.

In file included from test.cpp:1:0:
rte_mbuf.h: In function ‘rte_mbuf_ext_shared_info*
rte_pktmbuf_ext_shinfo_init_helper(void*, uint16_t*,
rte_mbuf_extbuf_free_callback_t, void*)’:
rte_mbuf.h:1349:9: error: invalid conversion
from ‘void*’ to ‘rte_mbuf_ext_shared_info*’ [-fpermissive]
  shinfo = RTE_PTR_ALIGN_FLOOR(RTE_PTR_SUB(buf_end,
         ^

Fixes: a53aa2b9f3be ("mbuf: support attaching external buffer")

Signed-off-by: David Marchand <david.marchand@6wind.com>
lib/librte_mbuf/rte_mbuf.h