On Tue, 3 Apr 2018 10:23:43 +0100 Ferruh Yigit <ferruh.yi...@intel.com> wrote:
> On 3/29/2018 6:05 PM, Stephen Hemminger wrote: > > This fixes some of the obvious warnings found building DPDK > > with gcc-8. There still are some deeper issues in the rte_hash_table > > code; leave the fix for that up to the maintainer. > > > > Stephen Hemminger (2): > > rte_mbuf: fix strncpy warnings > > rte_metrics: fix strncpy truncation warning > > > > v3 > > missing SOB on 1st patch > > > > v2 > > fix issues with wrong length in mbuf pool_ops > > don't need memset in metrics names > > > > Stephen Hemminger (2): > > rte_mbuf: fix strncpy warnings > > rte_metrics: fix strncpy truncation warning > > I tried with gcc-8 [1] and getting a few more build errors similar to these > ones. Are these two files only build error you get? > > > [1] > gcc (GCC) 8.0.1 20180401 (experimental) > This fixes the easy ones. The harder one is in cuckoo hash. CC rte_table_hash_cuckoo.o lib/librte_table/rte_table_hash_cuckoo.c: In function ‘rte_table_hash_cuckoo_create’: lib/librte_table/rte_table_hash_cuckoo.c:110:16: error: cast between incompatible function types from ‘rte_table_hash_op_hash’ {aka ‘long unsigned int (*)(void *, void *, unsigned int, long unsigned int)’} to ‘uint32_t (*)(const void *, uint32_t, uint32_t)’ {aka ‘unsigned int (*)(const void *, unsigned int, unsigned int)’} [-Werror=cast-function-type] .hash_func = (rte_hash_function)(p->f_hash), ^ cc1: all warnings being treated as errors Not sure what the right way to fix this one is. Hash table should not be defining its own special hash function prototype. Changing to a common definition is non-trivial and breaks ABI. Casting seems wrong, error prone, and a bad precedent in this case.