diff options
Diffstat (limited to 'src/vpp/api')
-rw-r--r-- | src/vpp/api/api.c | 3 | ||||
-rw-r--r-- | src/vpp/api/api_main.c | 2 | ||||
-rw-r--r-- | src/vpp/api/custom_dump.c | 36 | ||||
-rw-r--r-- | src/vpp/api/types.c | 3 | ||||
-rw-r--r-- | src/vpp/api/types.h | 4 |
5 files changed, 30 insertions, 18 deletions
diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c index b389a7a7a63..80449c64adc 100644 --- a/src/vpp/api/api.c +++ b/src/vpp/api/api.c @@ -287,8 +287,7 @@ get_thread_data (vl_api_thread_data_t * td, int index) static void vl_api_show_threads_t_handler (vl_api_show_threads_t * mp) { - vlib_main_t *vm = vlib_get_main (); - int rv = 0, count = 0; + int count = 0; #if !defined(__powerpc64__) vl_api_registration_t *reg; diff --git a/src/vpp/api/api_main.c b/src/vpp/api/api_main.c index 129860538cf..af31307d229 100644 --- a/src/vpp/api/api_main.c +++ b/src/vpp/api/api_main.c @@ -127,7 +127,6 @@ api_command_fn (vlib_main_t * vm, u32 arg_len; int rv; int (*fp) (vat_main_t *); - api_main_t *am = &api_main; maybe_register_api_client (vam); @@ -278,6 +277,7 @@ uword unformat_sw_if_index (unformat_input_t * input, va_list * args) { void *vam_unused = va_arg (*args, void *); + (void) (vam_unused); u32 *result = va_arg (*args, u32 *); vnet_main_t *vnm = vnet_get_main (); u32 sw_if_index = ~0; diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 32354e77e59..2c2c7ab06fc 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -119,7 +119,8 @@ static void *vl_api_sw_interface_set_flags_t_print FINISH; } -static void *vl_api_sw_interface_set_rx_placement_t_print +__clib_unused + static void *vl_api_sw_interface_set_rx_placement_t_print (vl_api_sw_interface_set_rx_placement_t * mp, void *handle) { u8 *s; @@ -136,7 +137,8 @@ static void *vl_api_sw_interface_set_rx_placement_t_print FINISH; } -static void *vl_api_sw_interface_rx_placement_dump_t_print +__clib_unused + static void *vl_api_sw_interface_rx_placement_dump_t_print (vl_api_sw_interface_rx_placement_dump_t * mp, void *handle) { u8 *s; @@ -528,7 +530,8 @@ static void *vl_api_bd_ip_mac_flush_t_print FINISH; } -static void *vl_api_bd_ip_mac_dump_t_print +__clib_unused + static void *vl_api_bd_ip_mac_dump_t_print (vl_api_bd_ip_mac_dump_t * mp, void *handle) { u8 *s; @@ -598,7 +601,8 @@ static void *vl_api_sw_interface_tap_v2_dump_t_print FINISH; } -static void *vl_api_virtio_pci_create_t_print +__clib_unused + static void *vl_api_virtio_pci_create_t_print (vl_api_virtio_pci_create_t * mp, void *handle) { u8 *s; @@ -618,7 +622,8 @@ static void *vl_api_virtio_pci_create_t_print FINISH; } -static void *vl_api_virtio_pci_delete_t_print +__clib_unused + static void *vl_api_virtio_pci_delete_t_print (vl_api_virtio_pci_delete_t * mp, void *handle) { u8 *s; @@ -629,7 +634,8 @@ static void *vl_api_virtio_pci_delete_t_print FINISH; } -static void *vl_api_sw_interface_virtio_pci_dump_t_print +__clib_unused + static void *vl_api_sw_interface_virtio_pci_dump_t_print (vl_api_sw_interface_virtio_pci_dump_t * mp, void *handle) { u8 *s; @@ -698,7 +704,8 @@ static void *vl_api_bond_detach_slave_t_print FINISH; } -static void *vl_api_sw_interface_bond_dump_t_print +__clib_unused + static void *vl_api_sw_interface_bond_dump_t_print (vl_api_sw_interface_bond_dump_t * mp, void *handle) { u8 *s; @@ -708,7 +715,8 @@ static void *vl_api_sw_interface_bond_dump_t_print FINISH; } -static void *vl_api_sw_interface_slave_dump_t_print +__clib_unused + static void *vl_api_sw_interface_slave_dump_t_print (vl_api_sw_interface_slave_dump_t * mp, void *handle) { u8 *s; @@ -1920,10 +1928,10 @@ static void *vl_api_gre_tunnel_add_del_t_print s = format (s, "instance %d ", ntohl (mp->tunnel.instance)); - if (mp->tunnel.type == GRE_TUNNEL_TYPE_TEB) + if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_TEB) s = format (s, "teb "); - if (mp->tunnel.type == GRE_TUNNEL_TYPE_ERSPAN) + if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_ERSPAN) s = format (s, "erspan %d ", ntohs (mp->tunnel.session_id)); if (mp->tunnel.outer_fib_id) @@ -2153,7 +2161,8 @@ static void *vl_api_show_version_t_print FINISH; } -static void *vl_api_show_threads_t_print +__clib_unused + static void *vl_api_show_threads_t_print (vl_api_show_threads_t * mp, void *handle) { u8 *s; @@ -3579,7 +3588,7 @@ static void *vl_api_tcp_configure_src_addresses_t_print static void *vl_api_app_namespace_add_del_t_print (vl_api_app_namespace_add_del_t * mp, void *handle) { - u8 *s, *ns_id = 0; + u8 *s; u8 len = clib_min (mp->namespace_id_len, ARRAY_LEN (mp->namespace_id) - 1); mp->namespace_id[len] = 0; @@ -3708,7 +3717,8 @@ static void *vl_api_session_rule_add_del_t_print FINISH; } -static void *vl_api_ip_container_proxy_add_del_t_print +__clib_unused + static void *vl_api_ip_container_proxy_add_del_t_print (vl_api_ip_container_proxy_add_del_t * mp, void *handle) { u8 *s; diff --git a/src/vpp/api/types.c b/src/vpp/api/types.c index 97dadbd4778..a4766c298c2 100644 --- a/src/vpp/api/types.c +++ b/src/vpp/api/types.c @@ -19,6 +19,9 @@ #include <vpp/api/types.h> #include <vat/vat.h> +const vl_api_mac_address_t VL_API_ZERO_MAC_ADDRESS; +const vl_api_address_t VL_API_ZERO_ADDRESS; + u8 * format_vl_api_address_family (u8 * s, va_list * args) { diff --git a/src/vpp/api/types.h b/src/vpp/api/types.h index a625e5d427a..40d80a09546 100644 --- a/src/vpp/api/types.h +++ b/src/vpp/api/types.h @@ -23,8 +23,8 @@ #include <vpp/api/vpe_all_api_h.h> #undef vl_typedefs -const vl_api_mac_address_t VL_API_ZERO_MAC_ADDRESS; -const vl_api_address_t VL_API_ZERO_ADDRESS; +extern const vl_api_mac_address_t VL_API_ZERO_MAC_ADDRESS; +extern const vl_api_address_t VL_API_ZERO_ADDRESS; extern uword unformat_vl_api_mac_address (unformat_input_t * input, va_list * args); extern uword unformat_vl_api_address_family (unformat_input_t * input, va_list * args); |