More GCC-7 errors 05/7005/2
authorMarco Varlese <marco.varlese@suse.com>
Mon, 5 Jun 2017 15:59:24 +0000 (17:59 +0200)
committerDamjan Marion <dmarion.lists@gmail.com>
Mon, 5 Jun 2017 19:58:18 +0000 (19:58 +0000)
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 <marco.varlese@suse.com>
src/plugins/snat/out2in.c
src/vppinfra/bihash_template.c

index 824406a..e8ddcf1 100644 (file)
@@ -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)
     {
index 7117f99..004e8a9 100644 (file)
@@ -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))
     ;