On Fri, 27 Mar 2015 11:56:00 +0100
Pawel Wodkowski <pawelx.wodkowski at intel.com> wrote:

> Fix strict aliasing rule error seen in gcc 4.4
> 
> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski at intel.com>
> ---
>  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);
>  }

Losing type information doesn't make this better!

Reply via email to