aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAloys Augustin <aloaugus@cisco.com>2020-09-01 15:59:46 +0200
committerBenoƮt Ganne <bganne@cisco.com>2020-09-01 15:22:32 +0000
commitb6e211ad3bd23299af2ddc5e2363e351770055f0 (patch)
tree4acf38ca7907f3b8104c8d0d584feed7db32a02d /src
parent6006ca85714fd2829f3e20429683f18d70943c04 (diff)
misc: fix uninitialized use warnings with gcc-{8,9}
Change-Id: I4930c3c2a8025ec9ceb17e994137be67d88d455f Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/af_xdp/input.c2
-rw-r--r--src/plugins/cnat/cnat_node_vip.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/af_xdp/input.c b/src/plugins/af_xdp/input.c
index e065ee2ab8f..c164c2576b7 100644
--- a/src/plugins/af_xdp/input.c
+++ b/src/plugins/af_xdp/input.c
@@ -108,7 +108,7 @@ af_xdp_device_input_refill (vlib_main_t * vm,
const u32 mask = size - 1;
u32 bis[VLIB_FRAME_SIZE], *bi = bis;
u32 n_alloc, n, n_wrap;
- u32 idx;
+ u32 idx = 0;
ASSERT (mask == rxq->fq.mask);
diff --git a/src/plugins/cnat/cnat_node_vip.c b/src/plugins/cnat/cnat_node_vip.c
index afabed08f1a..574b72fe27b 100644
--- a/src/plugins/cnat/cnat_node_vip.c
+++ b/src/plugins/cnat/cnat_node_vip.c
@@ -72,9 +72,9 @@ cnat_vip_inline (vlib_main_t * vm,
vlib_combined_counter_main_t *cntm = &cnat_translation_counters;
cnat_main_t *cm = &cnat_main;
const cnat_translation_t *ct = NULL;
- ip4_header_t *ip4;
+ ip4_header_t *ip4 = NULL;
ip_protocol_t iproto;
- ip6_header_t *ip6;
+ ip6_header_t *ip6 = NULL;
udp_header_t *udp0;
cnat_client_t *cc;
u16 next0;