From 0f48ca429bc7a816a6fb8a0d9bd119fe0471788c Mon Sep 17 00:00:00 2001 From: Jeff Shaw Date: Fri, 7 Dec 2018 16:01:26 -0800 Subject: [PATCH] hash: fix return of bulk lookup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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") Cc: stable@dpdk.org 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 c55a4f2632..7e6c139d3d 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 -- 2.20.1