From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 41C3EC11A for ; Tue, 16 Feb 2016 08:16:08 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id g62so177841628wme.0 for ; Mon, 15 Feb 2016 23:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=WM25gVZm8DzmNcsAGnKABEn1coic488RJlULXn4ATCI=; b=PDbFblh/uqYRJpGECb2OOzQKw2guixNAUgcDqpSN2jNvoAEP8yZlnPJkGoT+N+Lqbh IyQhJGZK/6MBAFT6UnRk7fy4PhJwBLuD9j83NxCyS9BqT20uhzqYRDetP2sr5ydjE9zk qPIeoEHMQv3YR/PY6QAC3JOGDgrJe4LtvKYgc+o2Zi8WKyRXgX4KULeKQJSR5hdzoYP+ XW+j7F8X+cQaU+sV3FH/oGqceE6bgNgTegfyb+SWj+S1wvwDRX5ao5sz/1mZzBNsIhyE 9AuIVr2cEnRtTmuv0GJU0yNj41XfnQwt/xT/CYQqeeciLvsQjSwY4q3wH2gSDgGcsEsx icfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=WM25gVZm8DzmNcsAGnKABEn1coic488RJlULXn4ATCI=; b=J1EP5/t/WrOLG/ThTduL3Y//U5jc2UfU/7U5U5wRCo6Rr1h1hRvqJ7uoYGpn2fdDZX pWZKYLkB1hH0Z+UxKLhMPUmWddKkFemQojybWYhMTk5fLtSvpWp+FApSNO7qV3Zl8PLe fS8PHxGiGSZ4ifl4r/bARJuAdvDS+LV/D1UqyC96RsLEsLdbAFxFaupw9kWOukPd/xBv nLbtOKDr2TJkSeyT2VFMxcbifBTEE6Or8cajxttzQwl4EVtA3Z3j/dvMFiWlc5sh08Ma fxPvz+llrTzAtXUr69Ns2EwgB63py4Npjjy/zu0FFtOCM5SxIg9zOACVv3oWpcw29b+V xcXQ== X-Gm-Message-State: AG10YOS8m4yzaz0hFC6zDVhvZWV2RkeCmI0AEc8dJ6P3hZ8t2BoXNO/YhiKXycaEiuCJ/+tQ X-Received: by 10.28.227.134 with SMTP id a128mr18138814wmh.67.1455606968148; Mon, 15 Feb 2016 23:16:08 -0800 (PST) Received: from XPS13.localdomain (165.20.90.92.rev.sfr.net. [92.90.20.165]) by smtp.gmail.com with ESMTPSA id b5sm19032574wmh.15.2016.02.15.23.16.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Feb 2016 23:16:07 -0800 (PST) From: Thomas Monjalon To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, remy.horton@intel.com Date: Tue, 16 Feb 2016 08:14:24 +0100 Message-Id: <1455606865-22680-3-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455606865-22680-1-git-send-email-thomas.monjalon@6wind.com> References: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> <1455606865-22680-1-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH v2 2/3] hash: fix header for C++ X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 07:16:08 -0000 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 Acked-by: Pablo de Lara --- 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