From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mbuf: properly cast shared data Date: Fri, 18 May 2018 13:24:37 +0200 Message-ID: <1600588.rlgGAYoWKD@xps> References: <1526469040-20860-1-git-send-email-david.marchand@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, olivier.matz@6wind.com To: David Marchand Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 75691AAC4 for ; Fri, 18 May 2018 13:24:40 +0200 (CEST) In-Reply-To: <1526469040-20860-1-git-send-email-david.marchand@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 16/05/2018 13:10, David Marchand: > Including rte_mbuf.h in C++ triggers the following warning as C++ does not > allow implicit casting of a void *. >=20 > In file included from test.cpp:1:0: > x86_64-native-linuxapp-gcc/include/rte_mbuf.h: In function > =E2=80=98rte_mbuf_ext_shared_info* rte_pktmbuf_ext_shinfo_init_helper(voi= d*, uint16_t*, > rte_mbuf_extbuf_free_callback_t, void*)=E2=80=99: > x86_64-native-linuxapp-gcc/include/rte_mbuf.h:1349:9: error: invalid conv= ersion > from =E2=80=98void*=E2=80=99 to =E2=80=98rte_mbuf_ext_shared_info*=E2=80= =99 [-fpermissive] > shinfo =3D RTE_PTR_ALIGN_FLOOR(RTE_PTR_SUB(buf_end, > ^ >=20 > Fixes: a53aa2b9f3be ("mbuf: support attaching external buffer") > Signed-off-by: David Marchand Applied, thanks