numam-dpdk/lib/librte_hash
Kevin Traynor 572f2a9089 hash: fix gcc 10 maybe-uninitialized warning
gcc 10.1.1 reports a warning for the ext_bkt_id variable:

../lib/librte_hash/rte_cuckoo_hash.c:
In function ‘__rte_hash_add_key_with_hash’:
../lib/librte_hash/rte_cuckoo_hash.c:1104:29:
warning: ‘ext_bkt_id’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
 1104 |  (h->buckets_ext[ext_bkt_id - 1]).sig_current[0] = short_sig;
      |                  ~~~~~~~~~~~^~~

The return value of rte_ring_sc_dequeue_elem() is already checked,
but also initialize ext_bkt_id to zero (invalid value) and check
that it also overwritten.

Fixes: fbfe568103 ("hash: use 32-bit elements rings to save memory")
Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
2020-05-18 13:54:36 +02:00
..
Makefile build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
meson.build build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
rte_cmp_arm64.h lib: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
rte_cmp_x86.h hash: fix TSX aborts with newer gcc 2018-11-14 01:02:07 +01:00
rte_crc_arm64.h lib: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
rte_cuckoo_hash.c hash: fix gcc 10 maybe-uninitialized warning 2020-05-18 13:54:36 +02:00
rte_cuckoo_hash.h hash: use 32-bit elements rings to save memory 2020-01-19 19:32:50 +01:00
rte_fbk_hash.c eal: hide shared memory config 2019-07-06 10:32:34 +02:00
rte_fbk_hash.h hash: select fbk function at run-time 2018-01-20 15:35:16 +01:00
rte_hash_crc.h hash: explicit casts for truncation in CRC32c 2018-05-13 22:45:37 +02:00
rte_hash_version.map hash: add bulk lookup with signatures array 2020-04-25 19:26:47 +02:00
rte_hash.h hash: add bulk lookup with signatures array 2020-04-25 19:26:47 +02:00
rte_jhash.h hash: replace license text with SPDX tag 2019-07-29 13:31:45 +02:00
rte_thash.h replace alignment attributes 2020-04-16 18:16:18 +02:00