From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8CA427DF8 for ; Fri, 27 Mar 2015 12:00:28 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 27 Mar 2015 04:00:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,478,1422950400"; d="scan'208";a="705036387" Received: from unknown (HELO Sent) ([10.217.248.233]) by orsmga002.jf.intel.com with SMTP; 27 Mar 2015 04:00:26 -0700 Received: by Sent (sSMTP sendmail emulation); Fri, 27 Mar 2015 11:56:15 +0100 From: Pawel Wodkowski To: dev@dpdk.org Date: Fri, 27 Mar 2015 11:56:00 +0100 Message-Id: <1427453761-20019-2-git-send-email-pawelx.wodkowski@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427453761-20019-1-git-send-email-pawelx.wodkowski@intel.com> References: <1427397455-30368-1-git-send-email-pablo.de.lara.guarch@intel.com> <1427453761-20019-1-git-send-email-pawelx.wodkowski@intel.com> Subject: [dpdk-dev] [PATCH v2 1/2] test: fix strict aliasing rule error in virtual pmd 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, 27 Mar 2015 11:00:29 -0000 Fix strict aliasing rule error seen in gcc 4.4 Signed-off-by: Pawel Wodkowski --- app/test/virtual_pmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index 9b07ab1..f163562 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -75,15 +75,15 @@ virtual_ethdev_start_fail(struct rte_eth_dev *eth_dev __rte_unused) } static void virtual_ethdev_stop(struct rte_eth_dev *eth_dev __rte_unused) { - struct rte_mbuf *pkt = NULL; + void *pkt = NULL; struct virtual_ethdev_private *prv = eth_dev->data->dev_private; eth_dev->data->dev_link.link_status = 0; eth_dev->data->dev_started = 0; - while (rte_ring_dequeue(prv->rx_queue, (void **)&pkt) != -ENOENT) + while (rte_ring_dequeue(prv->rx_queue, &pkt) != -ENOENT) rte_pktmbuf_free(pkt); - while (rte_ring_dequeue(prv->tx_queue, (void **)&pkt) != -ENOENT) + while (rte_ring_dequeue(prv->tx_queue, &pkt) != -ENOENT) rte_pktmbuf_free(pkt); } @@ -223,9 +223,9 @@ static void virtual_ethdev_stats_reset(struct rte_eth_dev *dev) { struct virtual_ethdev_private *dev_private = dev->data->dev_private; - struct rte_mbuf *pkt = NULL; + void *pkt = NULL; - while (rte_ring_dequeue(dev_private->tx_queue, (void **)&pkt) == -ENOBUFS) + while (rte_ring_dequeue(dev_private->tx_queue, &pkt) == -ENOBUFS) rte_pktmbuf_free(pkt); /* Reset internal statistics */ -- 1.9.1