From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Xie, Huawei" Subject: Re: [PATCH v4] Fixes following error on gcc 4.4.7: Date: Wed, 9 Dec 2015 13:28:40 +0000 Message-ID: References: <1449659374-78252-1-git-send-email-pablo.de.lara.guarch@intel.com> <1449663630-83289-1-git-send-email-pablo.de.lara.guarch@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: "De Lara Guarch, Pablo" , "dev@dpdk.org" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B677B68A5 for ; Wed, 9 Dec 2015 14:28:45 +0100 (CET) Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 12/9/2015 8:20 PM, De Lara Guarch, Pablo wrote:=0A= > make: Entering directory `/tmp/dpdk-tmp/examples/vhost'=0A= > CC main.o=0A= [...]=0A= > - rte_ring_sc_dequeue(vpool->ring, (void **)&mbuf);=0A= > + rte_ring_sc_dequeue(vpool->ring, (void *)mbuf);=0A= Here we are expecting the address of &mbuf, not mbuf, which is NULL.=0A= > if (unlikely(mbuf =3D=3D NULL)) {=0A= > LOG_DEBUG(VHOST_DATA,=0A= > "(%"PRIu64") in attach_rxmbuf_zcp: "=0A= > @@ -1801,7 +1801,7 @@ virtio_tx_route_zcp(struct virtio_net *dev, struct = rte_mbuf *m,=0A= > =0A= > /* Allocate an mbuf and populate the structure. */=0A= > vpool =3D &vpool_array[MAX_QUEUES + vmdq_rx_q];=0A= > - rte_ring_sc_dequeue(vpool->ring, (void **)&mbuf);=0A= > + rte_ring_sc_dequeue(vpool->ring, (void *)mbuf);=0A= Same as above.=0A= > if (unlikely(mbuf =3D=3D NULL)) {=0A= > struct vhost_virtqueue *vq =3D dev->virtqueue[VIRTIO_TXQ];=0A= > RTE_LOG(ERR, VHOST_DATA,=0A= =0A=