From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH 2/3] hash: fix header for C++ Date: Fri, 5 Feb 2016 18:06:08 +0100 Message-ID: <1454691969-25734-3-git-send-email-thomas.monjalon@6wind.com> References: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, remy.horton@intel.com Return-path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id DB71BC33A for ; Fri, 5 Feb 2016 18:08:16 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id r129so35775286wmr.0 for ; Fri, 05 Feb 2016 09:08:16 -0800 (PST) In-Reply-To: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When built in a C++ application, the jhash include fails: rte_jhash.h:123:22: error: invalid conversion from =E2=80=98const void*=E2=80=99 to =E2=80=98const u= int32_t*=E2=80=99 [-fpermissive] const uint32_t *k =3D key; ^ Fixes: 8718219a8737 ("hash: add new jhash functions") Signed-off-by: Thomas Monjalon --- 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_AR= CH_X86_X32) - const uint32_t *k =3D key; + const uint32_t *k =3D (const uint32_t *)key; const uint32_t s =3D 0; #else const uint32_t *k =3D (uint32_t *)((uintptr_t)key & (uintptr_t)~3); --=20 2.7.0