> -----Original Message----- > From: Singh, Jasvinder > Sent: Monday, April 9, 2018 1:50 PM > To: [email protected] > Cc: Dumitrescu, Cristian <[email protected]> > Subject: [PATCH] table: fix build error with gcc 8 > > Fix build error with gcc 8.0 due to cast between function types. > Fixes: 5a80bf0ae613 ("table: add cuckoo hash") > > Signed-off-by: Jasvinder Singh <[email protected]> > --- > lib/librte_table/rte_table_hash_cuckoo.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_table/rte_table_hash_cuckoo.c > b/lib/librte_table/rte_table_hash_cuckoo.c > index dcb4fe9..f7eae27 100644 > --- a/lib/librte_table/rte_table_hash_cuckoo.c > +++ b/lib/librte_table/rte_table_hash_cuckoo.c > @@ -103,11 +103,13 @@ rte_table_hash_cuckoo_create(void *params, > return NULL; > } > > + void *hash_func = p->f_hash; > + > /* Create cuckoo hash table */ > struct rte_hash_parameters hash_cuckoo_params = { > .entries = p->n_keys, > .key_len = p->key_size, > - .hash_func = (rte_hash_function)(p->f_hash), > + .hash_func = (rte_hash_function) hash_func, > .hash_func_init_val = p->seed, > .socket_id = socket_id, > .name = p->name > -- > 2.9.3
Acked-by: Cristian Dumitrescu <[email protected]>

