From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ecotelecom.ru (mail.ecotelecom.ru [193.105.59.24]) by dpdk.org (Postfix) with ESMTP id CED2B8D35 for ; Fri, 14 Aug 2015 10:59:41 +0200 (CEST) Received: from stand.localnet (unknown [10.210.0.221]) by mail.ecotelecom.ru (Postfix) with ESMTPA id C15D9D407DD for ; Fri, 14 Aug 2015 11:59:41 +0300 (MSK) From: Sergey Balabanov To: dev@dpdk.org Date: Fri, 14 Aug 2015 11:59:40 +0300 Message-ID: <3166223.tPyzP6C51N@stand> Organization: Ecotelecom User-Agent: KMail/4.14.7 (Linux/3.19.0-25-generic; KDE/4.14.8; x86_64; ; ) In-Reply-To: <1439541195-26630-1-git-send-email-avi@cloudius-systems.com> References: <1439541195-26630-1-git-send-email-avi@cloudius-systems.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] mbuf: fix incompatibility with C++ in header file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 08:59:42 -0000 The patch duplicates http://dpdk.org/dev/patchwork/patch/6750/ On Friday 14 August 2015 11:33:15 Avi Kivity wrote: > C++ doesn't allow implied casting from void * to another pointer, so > supply an explicit cast. > > Signed-off-by: Avi Kivity > --- > lib/librte_mbuf/rte_mbuf.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index c3b8c98..8c2db1b 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -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); } > > /**