From patchwork Sat Dec 8 00:01:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jeff Shaw X-Patchwork-Id: 48606 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74B53532C; Sat, 8 Dec 2018 01:05:06 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 485B1532C for ; Sat, 8 Dec 2018 01:05:05 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Dec 2018 16:05:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,327,1539673200"; d="scan'208";a="281898472" Received: from ae13-28.jf.intel.com ([10.166.188.62]) by orsmga005.jf.intel.com with ESMTP; 07 Dec 2018 16:05:04 -0800 From: Jeff Shaw To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, jeffrey.b.shaw@intel.com Date: Fri, 7 Dec 2018 16:01:26 -0800 Message-Id: <20181208000126.44046-1-jeffrey.b.shaw@intel.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] hash: fix __rte_hash_lookup_bulk return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The __rte_hash_lookup_bulk() function returns void, and therefore should not return with an expression. This commit fixes the following compiler warning when attempting to compile with "-pedantic -std=c11". warning: ISO C forbids ‘return’ with expression, in function returning void [-Wpedantic] Fixes: 9eca8bd7a61c ("hash: separate lock-free and r/w lock lookup") Signed-off-by: Jeff Shaw Acked-by: Bruce Richardson --- lib/librte_hash/rte_cuckoo_hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index c55a4f263..7e6c139d3 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -2022,11 +2022,11 @@ __rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys, uint64_t *hit_mask, void *data[]) { if (h->readwrite_concur_lf_support) - return __rte_hash_lookup_bulk_lf(h, keys, num_keys, - positions, hit_mask, data); + __rte_hash_lookup_bulk_lf(h, keys, num_keys, positions, + hit_mask, data); else - return __rte_hash_lookup_bulk_l(h, keys, num_keys, - positions, hit_mask, data); + __rte_hash_lookup_bulk_l(h, keys, num_keys, positions, + hit_mask, data); } int