From: Stephen Hemminger <stephen@networkplumber.org>
To: Jasvinder Singh <jasvinder.singh@intel.com>
Cc: dev@dpdk.org, cristian.dumitrescu@intel.com
Subject: Re: [PATCH] table: fix build error with gcc 8
Date: Mon, 9 Apr 2018 08:09:36 -0700 [thread overview]
Message-ID: <20180409080936.58ecb66c@xeon-e3> (raw)
In-Reply-To: <20180409124948.130974-1-jasvinder.singh@intel.com>
On Mon, 9 Apr 2018 13:49:48 +0100
Jasvinder Singh <jasvinder.singh@intel.com> wrote:
> Fix build error with gcc 8.0 due to cast between function types.
> Fixes: 5a80bf0ae613 ("table: add cuckoo hash")
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
> 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
This is just tricking the compiler into not complaining.
I would really rather see the two hash functions made the same.
next prev parent reply other threads:[~2018-04-09 15:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 12:49 [PATCH] table: fix build error with gcc 8 Jasvinder Singh
2018-04-09 12:59 ` Dumitrescu, Cristian
2018-04-09 13:09 ` Bruce Richardson
2018-04-09 14:51 ` Singh, Jasvinder
2018-04-09 15:28 ` Bruce Richardson
2018-04-09 16:41 ` Stephen Hemminger
2018-04-09 15:09 ` Stephen Hemminger [this message]
2018-04-09 15:58 ` Dumitrescu, Cristian
2018-04-09 16:38 ` Van Haaren, Harry
2018-04-09 16:43 ` Ferruh Yigit
2018-04-09 17:05 ` Dumitrescu, Cristian
2018-04-09 17:02 ` Dumitrescu, Cristian
2018-04-09 17:09 ` Ananyev, Konstantin
2018-04-09 17:26 ` Dumitrescu, Cristian
2018-04-10 12:32 ` Van Haaren, Harry
2018-04-10 11:43 ` Neil Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180409080936.58ecb66c@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.