hash: fix __rte_hash_lookup_bulk return value
PATCH 1/1 hash: fix __rte_hash_lookup_bulk return value
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]
--- lib/librte_hash/rte_cuckoo_hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
lib/librte_hash/rte_cuckoo_hash.c +4 -4
@@ -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
Signature · 1 line
2.14.3
Quoted 11 lines · Jeff Shaw
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 <[email protected]>---
Thomas Monjalon
Applied10/12/2018 11:29, Bruce Richardson:
Quoted 5 lines · Jeff Shaw
Quoted 4 lines
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".
Quoted 8 lines
Quoted 7 lines
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 <[email protected]>---
Acked-by Bruce Richardson <[email protected]>
Applied, thanks