diff options
author | YohanPipereau <ypiperea@cisco.com> | 2019-03-15 11:23:07 +0100 |
---|---|---|
committer | YohanPipereau <ypiperea@cisco.com> | 2019-03-19 20:27:11 +0100 |
commit | 7dd61fc820323344c7479dd767a2ee0f84abd810 (patch) | |
tree | c8708178c67bfb0c94af11e90ce8075828ebf7a8 /src/scvpp/src/sc_vpp_interface.c | |
parent | 5776cb5567b68470f23acafb4bec3d01833ce6df (diff) |
Suppress compiler Warnings for scvpp
-Unused Warnings for callbacks are suppressed with UNUSED maccro
-Remove unused function.
Change-Id: Ic31a1b40d59a4d9c4fc638452dee36586d1dacd5
Signed-off-by: YohanPipereau <ypiperea@cisco.com>
Diffstat (limited to 'src/scvpp/src/sc_vpp_interface.c')
-rw-r--r-- | src/scvpp/src/sc_vpp_interface.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/src/scvpp/src/sc_vpp_interface.c b/src/scvpp/src/sc_vpp_interface.c index 73b29ae..bc5befc 100644 --- a/src/scvpp/src/sc_vpp_interface.c +++ b/src/scvpp/src/sc_vpp_interface.c @@ -43,6 +43,8 @@ sw_interface_dump_cb(struct vapi_ctx_s *ctx, void *callback_ctx, vapi_error_e rv, bool is_last, vapi_payload_sw_interface_details *reply) { + UNUSED(rv); UNUSED(ctx); UNUSED(is_last); + vapi_payload_sw_interface_details *passed; ARG_CHECK(-EINVAL, callback_ctx); @@ -83,6 +85,7 @@ interface_dump_all_cb(struct vapi_ctx_s *ctx, void *callback_ctx, vapi_error_e rv, bool is_last, vapi_payload_sw_interface_details * reply) { + UNUSED(ctx); UNUSED(rv); dump_all_ctx *dctx = callback_ctx; if (is_last) @@ -100,7 +103,8 @@ interface_dump_all_cb(struct vapi_ctx_s *ctx, void *callback_ctx, vpp_interface_t * iface = &dctx->intfcArray[dctx->num_ifs]; iface->sw_if_index = reply->sw_if_index; - strncpy(iface->interface_name, reply->interface_name, VPP_INTFC_NAME_LEN); + strncpy(iface->interface_name, (char*) reply->interface_name, + VPP_INTFC_NAME_LEN); iface->l2_address_length = reply->l2_address_length; memcpy(iface->l2_address, reply->l2_address, reply->l2_address_length ); iface->link_speed = reply->link_speed; @@ -145,6 +149,8 @@ get_interface_id_cb (struct vapi_ctx_s *ctx, void *callback_ctx, vapi_error_e rv, bool is_last, vapi_payload_sw_interface_details * reply) { + UNUSED(ctx); UNUSED(rv); + sw_interface_details_query_t *dctx = callback_ctx; assert(dctx); @@ -225,28 +231,6 @@ bin_api_sw_interface_set_flags(uint32_t if_index, uint8_t up) return rv; } -VAPI_RETVAL_CB(sw_interface_set_l2_bridge); - -//set interface l2 bridge <interface> <bridge-domain-id> [bvi|uu-fwd] [shg] -static vapi_error_e -bin_api_sw_interface_set_l2_bridge(u32 bd_id, u32 rx_sw_if_index, bool enable) -{ - vapi_msg_sw_interface_set_l2_bridge *mp; - vapi_error_e rv; - - mp = vapi_alloc_sw_interface_set_l2_bridge (g_vapi_ctx_instance); - assert(NULL != mp); - - mp->payload.enable = enable; - mp->payload.bd_id = bd_id; - mp->payload.rx_sw_if_index = rx_sw_if_index; - - VAPI_CALL(vapi_sw_interface_set_l2_bridge (g_vapi_ctx_instance, mp, - sw_interface_set_l2_bridge_cb, NULL)); - - return rv; -} - int interface_enable(const char *interface_name, const bool enable) { ARG_CHECK(-1, interface_name); |