[dpdk-dev] [PATCH] ethdev: missing typecast from void in eth_dev_pci_specific_init

David Christensen drc at linux.vnet.ibm.com
Wed Apr 10 22:58:35 CEST 2019


> This is a duplicate of this patch:
> 
> https://patches.dpdk.org/patch/52505/
> 
> You are from 2 different Linux teams at IBM,
> you hit the same issue at the same time,
> you both miss to give an explanation,
> funny.

We both work for infrastructure teams who are supporting a project team 
that is developing a DPDK application that runs across multiple CPU 
architectures and encountered the error.

The error comes from g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0:

[CXX]       g++ -o utils/pcap_handle.o -c utils/pcap_handle.cc -g3 
-ggdb3 -mcpu=native -mtune=native -isystem 
/home/rchirra/gen/io/ppc64include -std=gnu++11 -flax-vector-conversions 
-Werror -isystem /home/rchirra/gen/io

In file included from drivers/pmd.cc:7:0:
/home/rchirra/gen/io/deps/dpdk/build/include/rte_ethdev_pci.h:
In function ‘int eth_dev_pci_specific_init(rte_eth_dev*, void*)’:
/home/rchirra/gen/io/deps/dpdk/build/include/rte_ethdev_pci.h:75:35: 
error: invalid conversion from ‘void*’ to ‘rte_pci_device*’ [-fpermissive]
   struct rte_pci_device *pci_dev = bus_device;
                                    ^~~~~~~~~~
make[1]: *** [drivers/pmd.o] Error 1

Do you believe that more permissive compiler flags are the better answer?

Dave



More information about the dev mailing list