From 47366b19fb7f65dba1a7c731ee765b1216f47e33 Mon Sep 17 00:00:00 2001 From: Marco Varlese Date: Mon, 5 Jun 2017 17:59:24 +0200 Subject: More GCC-7 errors The Wmaybe-uninitialized is the new error included with Wall. This patch addresses the warning and fixes it. Change-Id: I8fdf9ff2d236c46b717024a14874fbbbad8af303 Signed-off-by: Marco Varlese --- src/plugins/snat/out2in.c | 2 ++ src/vppinfra/bihash_template.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/plugins/snat/out2in.c b/src/plugins/snat/out2in.c index 824406ab..e8ddcf1c 100644 --- a/src/plugins/snat/out2in.c +++ b/src/plugins/snat/out2in.c @@ -308,6 +308,8 @@ u32 icmp_match_out2in_slow(snat_main_t *sm, vlib_node_runtime_t *node, sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX]; rx_fib_index0 = ip4_fib_table_get_index_for_sw_if_index (sw_if_index0); + key0.protocol = 0; + err = icmp_get_key (ip0, &key0); if (err != -1) { diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c index 7117f994..004e8a9a 100644 --- a/src/vppinfra/bihash_template.c +++ b/src/vppinfra/bihash_template.c @@ -252,6 +252,8 @@ int BV (clib_bihash_add_del) hash >>= h->log2_nbuckets; + tmp_b.linear_search = 0; + while (__sync_lock_test_and_set (h->writer_lock, 1)) ; -- cgit 1.2.3-korg