diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-04-30 11:50:46 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-06-07 11:21:59 +0000 |
commit | 49ee68443d41ffe1ab72c964104da980a2eb4367 (patch) | |
tree | f87d2096fbd19c629390548c7b1d6351e3479851 /src/plugins/lb | |
parent | 4168c4d914c36f76c45cd8c6dde207b9f1c688e2 (diff) |
build: add -Wall and -fno-common, fix reported issues
Type: refactor
Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/lb')
-rw-r--r-- | src/plugins/lb/lb_test.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/lb/lb_test.c b/src/plugins/lb/lb_test.c index cf55aec614f..00ad673d354 100644 --- a/src/plugins/lb/lb_test.c +++ b/src/plugins/lb/lb_test.c @@ -177,13 +177,14 @@ static int api_lb_add_del_vip (vat_main_t * vam) int ret; ip46_address_t ip_prefix; u8 prefix_length = 0; - u8 protocol; + u8 protocol = 0; u32 port = 0; u32 encap = 0; u32 dscp = ~0; u32 srv_type = LB_SRV_TYPE_CLUSTERIP; u32 target_port = 0; u32 new_length = 1024; + int is_del = 0; if (!unformat(line_input, "%U", unformat_ip46_prefix, &ip_prefix, &prefix_length, IP46_TYPE_ANY, &prefix_length)) { @@ -196,7 +197,7 @@ static int api_lb_add_del_vip (vat_main_t * vam) if (unformat(line_input, "new_len %d", &new_length)) ; else if (unformat(line_input, "del")) - mp->is_del = 1; + is_del = 1; else if (unformat(line_input, "protocol tcp")) { protocol = IP_PROTOCOL_TCP; @@ -254,6 +255,7 @@ static int api_lb_add_del_vip (vat_main_t * vam) mp->target_port = htons((u16)target_port); mp->node_port = htons((u16)target_port); mp->new_flows_table_length = htonl(new_length); + mp->is_del = is_del; S(mp); W (ret); @@ -269,7 +271,6 @@ static int api_lb_add_del_as (vat_main_t * vam) ip46_address_t vip_prefix, as_addr; u8 vip_plen; ip46_address_t *as_array = 0; - u32 vip_index; u32 port = 0; u8 protocol = 0; u8 is_del = 0; |