summaryrefslogtreecommitdiffstats
path: root/src/plugins/snat
diff options
context:
space:
mode:
authorGabriel Ganne <gabriel.ganne@enea.com>2017-03-06 16:08:52 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-07 12:13:23 +0000
commitdd42be209faad057a029638a01e54b37373761d3 (patch)
treef48a52cf7d4d6252bc793ea05cab0c048cb20b48 /src/plugins/snat
parentdfc9b7cac857a3a49555f9fc448bd2c6aa3400a6 (diff)
silence -Wmaybe-uninitialized warning
It does not look like it actually can be used uninitialized ... but gcc complains, so with Werror this prevents from compiling. sample warning output: In file included from /home/gannega/export/vpp/build-data/../src/vnet/handoff.h:21:0, from /home/gannega/export/vpp/build-data/../src/plugins/snat/in2out.c:19: /home/gannega/export/vpp/build-data/../src/plugins/snat/in2out.c: In function 'snat_in2out_node_fn_inline': /home/gannega/export/vpp/build-data/../src/vnet/ip/ip4_packet.h:244:15: error: 'inner_ip0' may be used uninitialized in this function [-Werror=maybe-uninitialized] i->checksum = 0; ^ /home/gannega/export/vpp/build-data/../src/plugins/snat/in2out.c:433:17: note: 'inner_ip0' was declared here ip4_header_t *inner_ip0; Change-Id: If7c35dfb528861fd4ec6374aa1343b48f0f93057 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Diffstat (limited to 'src/plugins/snat')
-rw-r--r--src/plugins/snat/in2out.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/snat/in2out.c b/src/plugins/snat/in2out.c
index c6dc7ca4e02..fd8d30a164a 100644
--- a/src/plugins/snat/in2out.c
+++ b/src/plugins/snat/in2out.c
@@ -430,7 +430,7 @@ static inline u32 icmp_in2out_slow_path (snat_main_t *sm,
{
snat_session_key_t key0;
icmp_echo_header_t *echo0, *inner_echo0 = 0;
- ip4_header_t *inner_ip0;
+ ip4_header_t *inner_ip0 = 0;
void *l4_header = 0;
icmp46_header_t *inner_icmp0;
clib_bihash_kv_8_8_t kv0, value0;