From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com,
remy.horton@intel.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 2/3] hash: fix header for C++
Date: Tue, 16 Feb 2016 08:14:24 +0100 [thread overview]
Message-ID: <1455606865-22680-3-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <1455606865-22680-1-git-send-email-thomas.monjalon@6wind.com>
When built in a C++ application, the jhash include fails:
rte_jhash.h:123:22: error:
invalid conversion from ‘const void*’ to ‘const uint32_t*’ [-fpermissive]
const uint32_t *k = key;
^
The cast must be explicit for C++.
Fixes: 8718219a8737 ("hash: add new jhash functions")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
lib/librte_hash/rte_jhash.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h
index 457f225..207478c 100644
--- a/lib/librte_hash/rte_jhash.h
+++ b/lib/librte_hash/rte_jhash.h
@@ -120,7 +120,7 @@ __rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc,
* If check_align is not set, first case will be used
*/
#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) || defined(RTE_ARCH_X86_X32)
- const uint32_t *k = key;
+ const uint32_t *k = (const uint32_t *)key;
const uint32_t s = 0;
#else
const uint32_t *k = (uint32_t *)((uintptr_t)key & (uintptr_t)~3);
--
2.7.0
next prev parent reply other threads:[~2016-02-16 7:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 17:06 [dpdk-dev] [PATCH 0/3] fix C++ includes Thomas Monjalon
2016-02-05 17:06 ` [dpdk-dev] [PATCH 1/3] eal: fix keep alive header for C++ Thomas Monjalon
2016-02-15 11:16 ` Remy Horton
2016-02-05 17:06 ` [dpdk-dev] [PATCH 2/3] hash: fix " Thomas Monjalon
2016-02-08 13:42 ` De Lara Guarch, Pablo
2016-02-05 17:06 ` [dpdk-dev] [PATCH 3/3] mbuf_offload: " Thomas Monjalon
2016-02-05 21:33 ` Thomas Monjalon
2016-02-16 7:14 ` [dpdk-dev] [PATCH v2 0/3] fix C++ includes Thomas Monjalon
2016-02-16 7:14 ` [dpdk-dev] [PATCH v2 1/3] eal: fix keep alive header for C++ Thomas Monjalon
2016-02-16 10:16 ` Remy Horton
2016-02-16 7:14 ` Thomas Monjalon [this message]
2016-02-16 7:14 ` [dpdk-dev] [PATCH v2 3/3] mbuf_offload: fix " Thomas Monjalon
2016-02-16 16:21 ` [dpdk-dev] [PATCH v2 0/3] fix C++ includes Ferruh Yigit
2016-02-16 16:26 ` Thomas Monjalon
2016-02-16 18:33 ` Marc
2016-02-21 10:49 ` Thomas Monjalon
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=1455606865-22680-3-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
--cc=remy.horton@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).