fix uninitialized vars warnings with -Os
Change-Id: I15a16ba9751b6b612bac61a160b5da394ed2e15c
Signed-off-by: Benoît Ganne <bganne@kalrayinc.com>
diff --git a/vnet/vnet/devices/af_packet/node.c b/vnet/vnet/devices/af_packet/node.c
index bc0ab8c..1739cb3 100644
--- a/vnet/vnet/devices/af_packet/node.c
+++ b/vnet/vnet/devices/af_packet/node.c
@@ -165,7 +165,7 @@
{
u32 data_len = tph->tp_snaplen;
u32 offset = 0;
- u32 bi0, first_bi0 = 0, prev_bi0;
+ u32 bi0 = 0, first_bi0 = 0, prev_bi0;
while (data_len)
{
diff --git a/vnet/vnet/ip/ip6_neighbor.c b/vnet/vnet/ip/ip6_neighbor.c
index 70d77a5..957e35b 100644
--- a/vnet/vnet/ip/ip6_neighbor.c
+++ b/vnet/vnet/ip/ip6_neighbor.c
@@ -1894,8 +1894,8 @@
ip6_radv_t *radv_info;
vlib_frame_t * f = 0;
u32 n_this_frame = 0;
- u32 n_left_to_next;
- u32 * to_next;
+ u32 n_left_to_next = 0;
+ u32 * to_next = 0;
u32 bo0;
icmp6_router_solicitation_header_t * h0;
vlib_buffer_t * b0;
diff --git a/vnet/vnet/ipsec/ikev2.c b/vnet/vnet/ipsec/ikev2.c
index 4a047ee..541ba0b 100644
--- a/vnet/vnet/ipsec/ikev2.c
+++ b/vnet/vnet/ipsec/ikev2.c
@@ -542,8 +542,8 @@
u8 last_payload = 0;
u8 * hmac = 0;
u32 len = clib_net_to_host_u32(ike->length);
- ike_payload_header_t * ikep;
- u32 plen;
+ ike_payload_header_t * ikep = 0;
+ u32 plen = 0;
ikev2_sa_transform_t * tr_integ;
tr_integ = ikev2_sa_get_td_for_type(sa->r_proposals, IKEV2_TRANSFORM_TYPE_INTEG);