aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-04-30 11:50:46 +0200
committerDamjan Marion <dmarion@me.com>2019-06-07 11:21:59 +0000
commit49ee68443d41ffe1ab72c964104da980a2eb4367 (patch)
treef87d2096fbd19c629390548c7b1d6351e3479851 /src/plugins
parent4168c4d914c36f76c45cd8c6dde207b9f1c688e2 (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')
-rw-r--r--src/plugins/flowprobe/flowprobe.c1
-rw-r--r--src/plugins/flowprobe/flowprobe.h1
-rw-r--r--src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c2
-rw-r--r--src/plugins/ioam/export/ioam_export_test.c2
-rw-r--r--src/plugins/lacp/node.h2
-rw-r--r--src/plugins/lb/lb_test.c7
-rw-r--r--src/plugins/nsim/nsim_test.c1
-rw-r--r--src/plugins/srv6-ad/ad.c1
-rw-r--r--src/plugins/srv6-ad/ad.h2
-rw-r--r--src/plugins/srv6-am/am.c1
-rw-r--r--src/plugins/srv6-am/am.h2
-rw-r--r--src/plugins/srv6-as/as.c1
-rw-r--r--src/plugins/srv6-as/as.h2
13 files changed, 14 insertions, 11 deletions
diff --git a/src/plugins/flowprobe/flowprobe.c b/src/plugins/flowprobe/flowprobe.c
index c130b908934..45de3a76be6 100644
--- a/src/plugins/flowprobe/flowprobe.c
+++ b/src/plugins/flowprobe/flowprobe.c
@@ -51,7 +51,6 @@
#undef vl_printfun
flowprobe_main_t flowprobe_main;
-vlib_node_registration_t flowprobe_walker_node;
static vlib_node_registration_t flowprobe_timer_node;
uword flowprobe_walker_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f);
diff --git a/src/plugins/flowprobe/flowprobe.h b/src/plugins/flowprobe/flowprobe.h
index 92c3f9063a3..2d28c81de33 100644
--- a/src/plugins/flowprobe/flowprobe.h
+++ b/src/plugins/flowprobe/flowprobe.h
@@ -157,6 +157,7 @@ typedef struct
} flowprobe_main_t;
extern flowprobe_main_t flowprobe_main;
+extern vlib_node_registration_t flowprobe_walker_node;
void flowprobe_flush_callback_ip4 (void);
void flowprobe_flush_callback_ip6 (void);
diff --git a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c
index 85e1ee37bcc..ff3f36783fc 100644
--- a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c
+++ b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c
@@ -59,7 +59,7 @@ typedef struct
vat_main_t *vat_main;
} export_test_main_t;
-export_test_main_t export_test_main;
+static export_test_main_t export_test_main;
#define foreach_standard_reply_retval_handler \
_(vxlan_gpe_ioam_export_enable_disable_reply)
diff --git a/src/plugins/ioam/export/ioam_export_test.c b/src/plugins/ioam/export/ioam_export_test.c
index 2af4eeed51a..cd98877ac22 100644
--- a/src/plugins/ioam/export/ioam_export_test.c
+++ b/src/plugins/ioam/export/ioam_export_test.c
@@ -60,7 +60,7 @@ typedef struct
vat_main_t *vat_main;
} export_test_main_t;
-export_test_main_t export_test_main;
+static export_test_main_t export_test_main;
#define foreach_standard_reply_retval_handler \
_(ioam_export_ip6_enable_disable_reply)
diff --git a/src/plugins/lacp/node.h b/src/plugins/lacp/node.h
index 88bc5872390..8bc7cf9329c 100644
--- a/src/plugins/lacp/node.h
+++ b/src/plugins/lacp/node.h
@@ -37,7 +37,7 @@ typedef enum
MARKER_N_PACKET_TEMPLATES,
} marker_packet_template_id_t;
-enum
+typedef enum
{
LACP_PROCESS_EVENT_START = 1,
LACP_PROCESS_EVENT_STOP = 2,
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;
diff --git a/src/plugins/nsim/nsim_test.c b/src/plugins/nsim/nsim_test.c
index 35f222eadf0..e3c95c7c204 100644
--- a/src/plugins/nsim/nsim_test.c
+++ b/src/plugins/nsim/nsim_test.c
@@ -226,7 +226,6 @@ api_nsim_configure (vat_main_t * vam)
unformat_input_t *i = vam->input;
f64 delay = 0.0, bandwidth = 0.0;
f64 packet_size = 1500.0;
- u32 num_workers = vlib_num_workers ();
u32 packets_per_drop = 0;
int ret;
diff --git a/src/plugins/srv6-ad/ad.c b/src/plugins/srv6-ad/ad.c
index 9cf9eb1f945..73ea3f6ac1f 100644
--- a/src/plugins/srv6-ad/ad.c
+++ b/src/plugins/srv6-ad/ad.c
@@ -35,6 +35,7 @@ unsigned char def_str[] =
"Endpoint with dynamic proxy to SR-unaware appliance";
unsigned char params_str[] = "nh <next-hop> oif <iface-out> iif <iface-in>";
+srv6_ad_main_t srv6_ad_main;
/*****************************************/
/* SRv6 LocalSID instantiation and removal functions */
diff --git a/src/plugins/srv6-ad/ad.h b/src/plugins/srv6-ad/ad.h
index ff00f84aac1..e519cfb6b6c 100644
--- a/src/plugins/srv6-ad/ad.h
+++ b/src/plugins/srv6-ad/ad.h
@@ -66,7 +66,7 @@ typedef struct
vlib_combined_counter_main_t invalid_counters;/**< Invalid rewrite counters */
} srv6_ad_main_t;
-srv6_ad_main_t srv6_ad_main;
+extern srv6_ad_main_t srv6_ad_main;
format_function_t format_srv6_ad_localsid;
unformat_function_t unformat_srv6_ad_localsid;
diff --git a/src/plugins/srv6-am/am.c b/src/plugins/srv6-am/am.c
index 9e3f2a32eb8..2507a75dce8 100644
--- a/src/plugins/srv6-am/am.c
+++ b/src/plugins/srv6-am/am.c
@@ -29,6 +29,7 @@ unsigned char keyword_str[] = "End.AM";
unsigned char def_str[] = "Endpoint to SR-unaware appliance via masquerading";
unsigned char params_str[] = "nh <next-hop> oif <iface-out> iif <iface-in>";
+srv6_am_main_t srv6_am_main;
/*****************************************/
/* SRv6 LocalSID instantiation and removal functions */
diff --git a/src/plugins/srv6-am/am.h b/src/plugins/srv6-am/am.h
index f9c8ba4479a..5d98a7ee8ac 100644
--- a/src/plugins/srv6-am/am.h
+++ b/src/plugins/srv6-am/am.h
@@ -46,7 +46,7 @@ typedef struct
u32 sw_if_index_in; /**< Incoming iface from proxied device */
} srv6_am_localsid_t;
-srv6_am_main_t srv6_am_main;
+extern srv6_am_main_t srv6_am_main;
format_function_t format_srv6_am_localsid;
unformat_function_t unformat_srv6_am_localsid;
diff --git a/src/plugins/srv6-as/as.c b/src/plugins/srv6-as/as.c
index 7a982dedda8..8cd964b60f2 100644
--- a/src/plugins/srv6-as/as.c
+++ b/src/plugins/srv6-as/as.c
@@ -36,6 +36,7 @@ unsigned char def_str[] =
unsigned char params_str[] =
"nh <next-hop> oif <iface-out> iif <iface-in> src <src-addr> next <sid> [next <sid> ...]";
+srv6_as_main_t srv6_as_main;
static inline u8 *
prepare_rewrite (ip6_address_t src_addr, ip6_address_t * sid_list,
diff --git a/src/plugins/srv6-as/as.h b/src/plugins/srv6-as/as.h
index 0eed05d3156..752d2529f56 100644
--- a/src/plugins/srv6-as/as.h
+++ b/src/plugins/srv6-as/as.h
@@ -68,7 +68,7 @@ typedef struct
vlib_combined_counter_main_t invalid_counters;/**< Invalid rewrite counters */
} srv6_as_main_t;
-srv6_as_main_t srv6_as_main;
+extern srv6_as_main_t srv6_as_main;
format_function_t format_srv6_as_localsid;
unformat_function_t unformat_srv6_as_localsid;