aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@kalrayinc.com>2016-04-08 22:25:05 -0700
committerBenoît Ganne <bganne@kalrayinc.com>2016-04-08 22:25:44 -0700
commitd5304450671790f085f897c7792cff4010085d06 (patch)
tree2e36e701af15cc14b98c67b0d30b885be949bb65 /vnet
parent7c38f1ff143c5a311df7be6fe6161d55d4b5d7eb (diff)
fix uninitialized vars warnings with -Os
Change-Id: I15a16ba9751b6b612bac61a160b5da394ed2e15c Signed-off-by: Benoît Ganne <bganne@kalrayinc.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/devices/af_packet/node.c2
-rw-r--r--vnet/vnet/ip/ip6_neighbor.c4
-rw-r--r--vnet/vnet/ipsec/ikev2.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/vnet/vnet/devices/af_packet/node.c b/vnet/vnet/devices/af_packet/node.c
index bc0ab8c6..1739cb3d 100644
--- a/vnet/vnet/devices/af_packet/node.c
+++ b/vnet/vnet/devices/af_packet/node.c
@@ -165,7 +165,7 @@ af_packet_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
{
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 70d77a5f..957e35b5 100644
--- a/vnet/vnet/ip/ip6_neighbor.c
+++ b/vnet/vnet/ip/ip6_neighbor.c
@@ -1894,8 +1894,8 @@ ip6_neighbor_process_timer_event (vlib_main_t * vm,
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 4a047ee1..541ba0b9 100644
--- a/vnet/vnet/ipsec/ikev2.c
+++ b/vnet/vnet/ipsec/ikev2.c
@@ -542,8 +542,8 @@ ikev2_decrypt_sk_payload(ikev2_sa_t * sa, ike_header_t * ike, u8 * payload)
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);