diff options
Diffstat (limited to 'src')
26 files changed, 37 insertions, 75 deletions
diff --git a/src/plugins/dhcp/dhcp6_proxy_node.c b/src/plugins/dhcp/dhcp6_proxy_node.c index 11207690969..ad0b70498a0 100644 --- a/src/plugins/dhcp/dhcp6_proxy_node.c +++ b/src/plugins/dhcp/dhcp6_proxy_node.c @@ -136,8 +136,8 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, dhcp_proxy_main_t *dpm = &dhcp_proxy_main; from = vlib_frame_vector_args (from_frame); n_left_from = from_frame->n_vectors; - u32 pkts_to_server = 0, pkts_to_client = 0, pkts_no_server = 0; - u32 pkts_no_interface_address = 0, pkts_no_exceeding_max_hop = 0; + u32 pkts_to_server = 0, pkts_to_client = 0; + u32 pkts_no_interface_address = 0; u32 pkts_no_src_address = 0; u32 pkts_wrong_msg_type = 0; u32 pkts_too_big = 0; @@ -236,7 +236,6 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, { error0 = DHCPV6_PROXY_ERROR_NO_SERVER; next0 = DHCPV6_PROXY_TO_SERVER_INPUT_NEXT_DROP; - pkts_no_server++; goto do_trace; } @@ -274,7 +273,6 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, { error0 = DHCPV6_RELAY_PKT_DROP_MAX_HOPS; next0 = DHCPV6_PROXY_TO_SERVER_INPUT_NEXT_DROP; - pkts_no_exceeding_max_hop++; goto do_trace; } diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c index 32331ffa6e4..f0eaa7a4355 100644 --- a/src/plugins/ikev2/ikev2.c +++ b/src/plugins/ikev2/ikev2.c @@ -4445,7 +4445,7 @@ ikev2_resolve_responder_hostname (vlib_main_t *vm, ikev2_responder_t *r) u8 *name; int rv; - if (!km->dns_resolve_name) + if (!km->dns_resolve_name_ptr) return clib_error_return (0, "cannot load symbols from dns plugin"); t0->request_type = DNS_API_PENDING_NAME_TO_IP; @@ -4453,7 +4453,8 @@ ikev2_resolve_responder_hostname (vlib_main_t *vm, ikev2_responder_t *r) * whereas DNS resolver expects a NULL-terminated C-string */ name = vec_dup (r->hostname); vec_terminate_c_string (name); - rv = km->dns_resolve_name (name, &ep, t0, rn); + rv = ((__typeof__ (dns_resolve_name) *) km->dns_resolve_name_ptr) (name, &ep, + t0, rn); vec_free (name); if (rv < 0) return clib_error_return (0, "dns lookup failure"); @@ -5443,9 +5444,9 @@ ikev2_lazy_init (ikev2_main_t *km) km->punt_hdl = vlib_punt_client_register ("ikev2"); - km->dns_resolve_name = + km->dns_resolve_name_ptr = vlib_get_plugin_symbol ("dns_plugin.so", "dns_resolve_name"); - if (!km->dns_resolve_name) + if (!km->dns_resolve_name_ptr) ikev2_log_error ("cannot load symbols from dns plugin"); /* wake up ikev2 process */ diff --git a/src/plugins/ikev2/ikev2_priv.h b/src/plugins/ikev2/ikev2_priv.h index 4ce147890d5..faa0ca75d66 100644 --- a/src/plugins/ikev2/ikev2_priv.h +++ b/src/plugins/ikev2/ikev2_priv.h @@ -532,7 +532,7 @@ typedef struct u8 dpd_disabled; /* pointer to name resolver function in dns plugin */ - int (*dns_resolve_name) (); + void *dns_resolve_name_ptr; /* flag indicating whether lazy init is done or not */ int lazy_init_done; diff --git a/src/plugins/ioam/analyse/ioam_summary_export.c b/src/plugins/ioam/analyse/ioam_summary_export.c index ceec1551bea..09884fdb019 100644 --- a/src/plugins/ioam/analyse/ioam_summary_export.c +++ b/src/plugins/ioam/analyse/ioam_summary_export.c @@ -275,7 +275,6 @@ ioam_send_flows (flow_report_main_t *frm, ipfix_exporter_t *exp, ipfix_set_header_t *s = NULL; ip4_header_t *ip; udp_header_t *udp; - u32 records_this_buffer; u16 new_l0, old_l0; ip_csum_t sum0; vlib_main_t *vm = vlib_get_main (); @@ -329,13 +328,11 @@ ioam_send_flows (flow_report_main_t *frm, ipfix_exporter_t *exp, h->sequence_number = stream->sequence_number++; h->sequence_number = clib_host_to_net_u32 (h->sequence_number); next_offset = (u32) (((u8 *) (s + 1)) - (u8 *) tp); - records_this_buffer = 0; } next_offset = ioam_analyse_add_ipfix_record (fr, record, b0, next_offset, &temp, &temp, 0, 0); - records_this_buffer++; /* Flush data if packet len is about to reach path mtu */ if (next_offset > (exp->path_mtu - 250)) diff --git a/src/plugins/ioam/lib-pot/math64.h b/src/plugins/ioam/lib-pot/math64.h index 4c608a37de4..2084c25fa58 100644 --- a/src/plugins/ioam/lib-pot/math64.h +++ b/src/plugins/ioam/lib-pot/math64.h @@ -51,23 +51,23 @@ static inline void mul64by64(u64 a, u64 b, u64 * hi, u64 * lo) static inline u64 mod128by64(u64 x, u64 y, u64 m, double di) { - u64 q1, q2, q; - u64 p1, p0; - double dq; + u64 q1, q2; + u64 p1, p0; + double dq; - /* calculate quotient first pass 53 bits */ - dq = (TWO64 * (double)x + (double)y) * di; + /* calculate quotient first pass 53 bits */ + dq = (TWO64 * (double) x + (double) y) * di; - if (dq >= TWO64) - q1 = 0xfffffffffffff800L; - else - q1 = dq; + if (dq >= TWO64) + q1 = 0xfffffffffffff800L; + else + q1 = dq; - /* q1 * m to compare the product to the dividend. */ - mul64by64(q1, m, &p1, &p0); + /* q1 * m to compare the product to the dividend. */ + mul64by64 (q1, m, &p1, &p0); - /* Adjust quotient. is it > actual result: */ - if (x < p1 || (x == p1 && y < p0)) + /* Adjust quotient. is it > actual result: */ + if (x < p1 || (x == p1 && y < p0)) { /* q1 > quotient. calculate abs remainder */ x = p1 - (x + (p0 < y)); @@ -77,7 +77,6 @@ static inline u64 mod128by64(u64 x, u64 y, u64 m, double di) q2 = (u64) ((TWO64 * (double)x + (double)y) * di); mul64by64(q2, m, &p1, &p0); - q = q1 - q2; if (x < p1 || (x == p1 && y <= p0)) { y = p0 - y; @@ -86,7 +85,6 @@ static inline u64 mod128by64(u64 x, u64 y, u64 m, double di) { y = p0 - y; y += m; - q--; } } else @@ -97,12 +95,10 @@ static inline u64 mod128by64(u64 x, u64 y, u64 m, double di) q2 = (u64) ((TWO64 * (double)x + (double)y) * di); mul64by64(q2, m, &p1, &p0); - q = q1 + q2; if (x < p1 || (x == p1 && y < p0)) { y = y - p0; y += m; - q--; } else { @@ -110,7 +106,6 @@ static inline u64 mod128by64(u64 x, u64 y, u64 m, double di) if (y >= m) { y -= m; - q++; } } } diff --git a/src/plugins/ioam/udp-ping/udp_ping_export.c b/src/plugins/ioam/udp-ping/udp_ping_export.c index 3dc1436a1a9..de0bad7a855 100644 --- a/src/plugins/ioam/udp-ping/udp_ping_export.c +++ b/src/plugins/ioam/udp-ping/udp_ping_export.c @@ -45,7 +45,6 @@ udp_ping_send_flows (flow_report_main_t *frm, ipfix_exporter_t *exp, ipfix_set_header_t *s = NULL; ip4_header_t *ip; udp_header_t *udp; - u32 records_this_buffer; u16 new_l0, old_l0; ip_csum_t sum0; vlib_main_t *vm = vlib_get_main (); @@ -99,7 +98,6 @@ udp_ping_send_flows (flow_report_main_t *frm, ipfix_exporter_t *exp, h->sequence_number = clib_host_to_net_u32 (h->sequence_number); next_offset = (u32) (((u8 *) (s + 1)) - (u8 *) tp); - records_this_buffer = 0; } next_offset = ioam_analyse_add_ipfix_record (fr, @@ -115,8 +113,6 @@ udp_ping_send_flows (flow_report_main_t *frm, ipfix_exporter_t *exp, //memcpy (b0->data + next_offset, &pak_sent, sizeof(u32)); //next_offset += sizeof(u32); - records_this_buffer++; - /* Flush data if packet len is about to reach path mtu */ if (next_offset > (exp->path_mtu - UDP_PING_EXPORT_RECORD_SIZE)) { diff --git a/src/plugins/lb/api.c b/src/plugins/lb/api.c index 3aa745c5559..bf4a50ddb04 100644 --- a/src/plugins/lb/api.c +++ b/src/plugins/lb/api.c @@ -209,7 +209,6 @@ static void send_lb_as_details lb_main_t *lbm = &lb_main; int msg_size = 0; u32 *as_index; - u32 asindex = 0; /* construct as list under this vip */ lb_as_t *as; @@ -233,7 +232,6 @@ static void send_lb_as_details rmp->in_use_since = htonl(as->last_used); vl_api_send_msg (reg, (u8 *) rmp); - asindex++; } } diff --git a/src/plugins/lisp/lisp-cp/control.h b/src/plugins/lisp/lisp-cp/control.h index 524f5028465..e65ceafd431 100644 --- a/src/plugins/lisp/lisp-cp/control.h +++ b/src/plugins/lisp/lisp-cp/control.h @@ -299,7 +299,7 @@ extern vlib_node_registration_t lisp_cp_input_node; extern vlib_node_registration_t lisp_cp_lookup_ip4_node; extern vlib_node_registration_t lisp_cp_lookup_ip6_node; -clib_error_t *lisp_cp_init (); +clib_error_t *lisp_cp_init (vlib_main_t *); always_inline lisp_cp_main_t * vnet_lisp_cp_get_main () diff --git a/src/plugins/nat/det44/det44.h b/src/plugins/nat/det44/det44.h index 20dc8b1aec9..7d290f4a956 100644 --- a/src/plugins/nat/det44/det44.h +++ b/src/plugins/nat/det44/det44.h @@ -229,7 +229,7 @@ plugin_enabled () extern vlib_node_registration_t det44_in2out_node; extern vlib_node_registration_t det44_out2in_node; -int det44_plugin_enable (); +int det44_plugin_enable (det44_config_t); int det44_plugin_disable (); int det44_interface_add_del (u32 sw_if_index, u8 is_inside, int is_del); diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c index 39651244057..5106031c681 100644 --- a/src/plugins/quic/quic.c +++ b/src/plugins/quic/quic.c @@ -2674,7 +2674,6 @@ quic_get_counter_value (u32 event_code) u32 code, i; u64 c, sum = 0; - int index = 0; vm = vlib_get_main (); em = &vm->error_main; @@ -2689,7 +2688,6 @@ quic_get_counter_value (u32 event_code) if (i < vec_len (em->counters_last_clear)) c -= em->counters_last_clear[i]; sum += c; - index++; } return sum; } diff --git a/src/plugins/srv6-ad/node.c b/src/plugins/srv6-ad/node.c index 9d4ea44e19b..f04d4ac2114 100644 --- a/src/plugins/srv6-ad/node.c +++ b/src/plugins/srv6-ad/node.c @@ -203,7 +203,6 @@ srv6_ad_localsid_fn (vlib_main_t * vm, { ip6_sr_main_t *sm = &sr_main; u32 n_left_from, next_index, *from, *to_next; - u32 cnt_packets = 0; from = vlib_frame_vector_args (frame); n_left_from = frame->n_vectors; @@ -264,7 +263,6 @@ srv6_ad_localsid_fn (vlib_main_t * vm, vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, bi0, next0); - cnt_packets++; } vlib_put_next_frame (vm, node, next_index, n_left_to_next); diff --git a/src/plugins/srv6-am/node.c b/src/plugins/srv6-am/node.c index dd71e60d5a2..dd2b1c4d542 100644 --- a/src/plugins/srv6-am/node.c +++ b/src/plugins/srv6-am/node.c @@ -142,7 +142,6 @@ srv6_am_localsid_fn (vlib_main_t * vm, { ip6_sr_main_t *sm = &sr_main; u32 n_left_from, next_index, *from, *to_next; - u32 cnt_packets = 0; from = vlib_frame_vector_args (frame); n_left_from = frame->n_vectors; @@ -203,8 +202,6 @@ srv6_am_localsid_fn (vlib_main_t * vm, vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, bi0, next0); - - cnt_packets++; } vlib_put_next_frame (vm, node, next_index, n_left_to_next); diff --git a/src/plugins/srv6-as/node.c b/src/plugins/srv6-as/node.c index 9e84a9848e5..4beb8dfd7ac 100644 --- a/src/plugins/srv6-as/node.c +++ b/src/plugins/srv6-as/node.c @@ -169,7 +169,6 @@ srv6_as_localsid_fn (vlib_main_t * vm, { ip6_sr_main_t *sm = &sr_main; u32 n_left_from, next_index, *from, *to_next; - u32 cnt_packets = 0; from = vlib_frame_vector_args (frame); n_left_from = frame->n_vectors; @@ -227,8 +226,6 @@ srv6_as_localsid_fn (vlib_main_t * vm, vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, bi0, next0); - - cnt_packets++; } vlib_put_next_frame (vm, node, next_index, n_left_to_next); diff --git a/src/vat/vat.h b/src/vat/vat.h index 10199e3e9e6..d8045752b35 100644 --- a/src/vat/vat.h +++ b/src/vat/vat.h @@ -131,7 +131,7 @@ typedef struct struct vat_registered_features_t; -typedef struct +typedef struct vat_main_ { /* vpe input queue */ svm_queue_t *vl_input_queue; @@ -234,7 +234,7 @@ typedef struct struct vat_registered_features_t *feature_function_registrations; - int (*api_sw_interface_dump) (); + int (*api_sw_interface_dump) (struct vat_main_ *); /* Convenience */ vlib_main_t *vlib_main; diff --git a/src/vlib/cli.c b/src/vlib/cli.c index c43371e0d9f..9c53200f8cf 100644 --- a/src/vlib/cli.c +++ b/src/vlib/cli.c @@ -872,14 +872,14 @@ show_memory_usage (vlib_main_t * vm, } if (stats_segment) { - void *oldheap = vlib_stats_set_heap (0); + void *oldheap = vlib_stats_set_heap (); was_enabled = clib_mem_trace_enable_disable (0); u8 *s_in_svm = format (0, "%U\n", format_clib_mem_heap, 0, 1); if (oldheap) clib_mem_set_heap (oldheap); u8 *s = vec_dup (s_in_svm); - oldheap = vlib_stats_set_heap (0); + oldheap = vlib_stats_set_heap (); vec_free (s_in_svm); if (oldheap) { diff --git a/src/vlib/node.h b/src/vlib/node.h index dbff6c1e1e0..e40208b4bed 100644 --- a/src/vlib/node.h +++ b/src/vlib/node.h @@ -201,7 +201,8 @@ static __clib_unused vlib_node_registration_t __clib_unused_##x #endif #define VLIB_NODE_FN(node) \ - uword CLIB_MARCH_SFX (node##_fn) (); \ + uword CLIB_MARCH_SFX (node##_fn) (vlib_main_t *, vlib_node_runtime_t *, \ + vlib_frame_t *); \ static vlib_node_fn_registration_t CLIB_MARCH_SFX ( \ node##_fn_registration) = { \ .function = &CLIB_MARCH_SFX (node##_fn), \ diff --git a/src/vnet/devices/pipe/pipe.c b/src/vnet/devices/pipe/pipe.c index 26b01970b6c..cd22c1a1478 100644 --- a/src/vnet/devices/pipe/pipe.c +++ b/src/vnet/devices/pipe/pipe.c @@ -131,7 +131,7 @@ pipe_tx (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { u32 n_left_from, n_left_to_next, n_copy, *from, *to_next; u32 next_index = VNET_PIPE_TX_NEXT_ETHERNET_INPUT; - u32 i, sw_if_index = 0, n_pkts = 0; + u32 i, sw_if_index = 0; vlib_buffer_t *b; pipe_t *pipe; @@ -159,7 +159,6 @@ pipe_tx (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) vnet_buffer (b)->sw_if_index[VLIB_TX] = ~0; i++; - n_pkts++; } from += n_copy; diff --git a/src/vnet/interface.h b/src/vnet/interface.h index c8fbc61ec7b..8ba5c996e0d 100644 --- a/src/vnet/interface.h +++ b/src/vnet/interface.h @@ -320,7 +320,8 @@ static __clib_unused vnet_device_class_t __clib_unused_##x #endif #define VNET_DEVICE_CLASS_TX_FN(devclass) \ - uword CLIB_MARCH_SFX (devclass##_tx_fn) (); \ + uword CLIB_MARCH_SFX (devclass##_tx_fn) ( \ + vlib_main_t *, vlib_node_runtime_t *, vlib_frame_t *); \ static vlib_node_fn_registration_t CLIB_MARCH_SFX ( \ devclass##_tx_fn_registration) = { \ .function = &CLIB_MARCH_SFX (devclass##_tx_fn), \ diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c index 5b69234e438..fca96aff0d6 100644 --- a/src/vnet/ip/reass/ip4_full_reass.c +++ b/src/vnet/ip/reass/ip4_full_reass.c @@ -647,7 +647,6 @@ ip4_full_reass_finalize (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_buffer_t *last_b = NULL; u32 sub_chain_bi = reass->first_bi; u32 total_length = 0; - u32 buf_cnt = 0; do { u32 tmp_bi = sub_chain_bi; @@ -684,7 +683,6 @@ ip4_full_reass_finalize (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_buffer_length_in_chain (vm, tmp) - trim_front - trim_end; while (1) { - ++buf_cnt; if (trim_front) { if (trim_front > tmp->current_length) diff --git a/src/vnet/ip/reass/ip6_full_reass.c b/src/vnet/ip/reass/ip6_full_reass.c index 97815572ee2..582dbf60679 100644 --- a/src/vnet/ip/reass/ip6_full_reass.c +++ b/src/vnet/ip/reass/ip6_full_reass.c @@ -705,8 +705,6 @@ ip6_full_reass_finalize (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_buffer_t *last_b = NULL; u32 sub_chain_bi = reass->first_bi; u32 total_length = 0; - u32 buf_cnt = 0; - u32 dropped_cnt = 0; u32 *vec_drop_compress = NULL; ip6_full_reass_rc_t rv = IP6_FULL_REASS_RC_OK; do @@ -748,7 +746,6 @@ ip6_full_reass_finalize (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_buffer_length_in_chain (vm, tmp) - trim_front - trim_end; while (1) { - ++buf_cnt; if (trim_front) { if (trim_front > tmp->current_length) @@ -804,7 +801,6 @@ ip6_full_reass_finalize (vlib_main_t * vm, vlib_node_runtime_t * node, goto free_buffers_and_return; } vec_add1 (vec_drop_compress, tmp_bi); - ++dropped_cnt; } if (tmp->flags & VLIB_BUFFER_NEXT_PRESENT) { diff --git a/src/vnet/ipfix-export/flow_report_classify.c b/src/vnet/ipfix-export/flow_report_classify.c index ea6ba5cab58..7e9fcfc1a07 100644 --- a/src/vnet/ipfix-export/flow_report_classify.c +++ b/src/vnet/ipfix-export/flow_report_classify.c @@ -179,7 +179,6 @@ ipfix_classify_send_flows (flow_report_main_t *frm, ipfix_exporter_t *exp, tcpudp_header_t *tcpudp; udp_header_t *udp; int field_index; - u32 records_this_buffer; u16 new_l0, old_l0; ip_csum_t sum0; vlib_main_t *vm = frm->vlib_main; @@ -251,7 +250,6 @@ ipfix_classify_send_flows (flow_report_main_t *frm, ipfix_exporter_t *exp, next_offset = (u32) (((u8 *) (s + 1)) - (u8 *) tp); record_offset = next_offset; - records_this_buffer = 0; } field_index = 0; @@ -275,7 +273,6 @@ ipfix_classify_send_flows (flow_report_main_t *frm, ipfix_exporter_t *exp, sizeof (packets)); next_offset += sizeof (packets); } - records_this_buffer++; stream->sequence_number++; /* Next record will have the same size as this record */ diff --git a/src/vnet/ipsec/esp_decrypt.c b/src/vnet/ipsec/esp_decrypt.c index af90bc4c7ba..f80b3794f2a 100644 --- a/src/vnet/ipsec/esp_decrypt.c +++ b/src/vnet/ipsec/esp_decrypt.c @@ -1017,7 +1017,7 @@ esp_decrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *sync_bufs[VLIB_FRAME_SIZE]; u16 sync_nexts[VLIB_FRAME_SIZE], *sync_next = sync_nexts, n_sync = 0; u16 async_nexts[VLIB_FRAME_SIZE], *async_next = async_nexts; - u16 noop_nexts[VLIB_FRAME_SIZE], *noop_next = noop_nexts, n_noop = 0; + u16 noop_nexts[VLIB_FRAME_SIZE], n_noop = 0; u32 sync_bi[VLIB_FRAME_SIZE]; u32 noop_bi[VLIB_FRAME_SIZE]; esp_decrypt_packet_data_t pkt_data[VLIB_FRAME_SIZE], *pd = pkt_data; @@ -1196,7 +1196,6 @@ esp_decrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node, { noop_bi[n_noop] = from[b - bufs]; n_noop++; - noop_next++; } else if (!is_async) { diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c index 4ed3bf72c3f..4d312be1f94 100644 --- a/src/vnet/ipsec/esp_encrypt.c +++ b/src/vnet/ipsec/esp_encrypt.c @@ -573,8 +573,8 @@ esp_encrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node, ESP_ENCRYPT_NEXT_HANDOFF_MPLS)); vlib_buffer_t *sync_bufs[VLIB_FRAME_SIZE]; u16 sync_nexts[VLIB_FRAME_SIZE], *sync_next = sync_nexts, n_sync = 0; - u16 async_nexts[VLIB_FRAME_SIZE], *async_next = async_nexts, n_async = 0; - u16 noop_nexts[VLIB_FRAME_SIZE], *noop_next = noop_nexts, n_noop = 0; + u16 n_async = 0; + u16 noop_nexts[VLIB_FRAME_SIZE], n_noop = 0; u32 sync_bi[VLIB_FRAME_SIZE]; u32 noop_bi[VLIB_FRAME_SIZE]; esp_encrypt_error_t err; @@ -995,7 +995,6 @@ esp_encrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node, { noop_bi[n_noop] = from[b - bufs]; n_noop++; - noop_next++; } else if (!is_async) { @@ -1007,7 +1006,6 @@ esp_encrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node, else { n_async++; - async_next++; } n_left -= 1; b += 1; diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h index a68e51239bd..4fa9194077e 100644 --- a/src/vnet/session/session.h +++ b/src/vnet/session/session.h @@ -769,7 +769,7 @@ void session_wrk_enable_adaptive_mode (session_worker_t *wrk); fifo_segment_t *session_main_get_wrk_mqs_segment (void); void session_node_enable_disable (u8 is_en); clib_error_t *vnet_session_enable_disable (vlib_main_t * vm, u8 is_en); -void session_wrk_handle_evts_main_rpc (); +void session_wrk_handle_evts_main_rpc (void *); session_t *session_alloc_for_connection (transport_connection_t * tc); session_t *session_alloc_for_half_open (transport_connection_t *tc); diff --git a/src/vpp-api/client/test.c b/src/vpp-api/client/test.c index 86d6aef79be..c242e6611a4 100644 --- a/src/vpp-api/client/test.c +++ b/src/vpp-api/client/test.c @@ -70,7 +70,6 @@ wrap_vac_callback (unsigned char *data, int len) static void test_connect () { - static int i; int rv = vac_connect("vac_client", NULL, wrap_vac_callback, 32 /* rx queue-length*/); if (rv != 0) { printf("Connect failed: %d\n", rv); @@ -78,7 +77,6 @@ test_connect () } printf("."); vac_disconnect(); - i++; } static void diff --git a/src/vppinfra/dlmalloc.c b/src/vppinfra/dlmalloc.c index cc5915a3852..5cdc6f6cc13 100644 --- a/src/vppinfra/dlmalloc.c +++ b/src/vppinfra/dlmalloc.c @@ -2596,7 +2596,7 @@ static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) { msegmentptr ss = (msegmentptr)(chunk2mem(sp)); mchunkptr tnext = chunk_plus_offset(sp, ssize); mchunkptr p = tnext; - int nfences = 0; + int __attribute__((unused)) nfences = 0; /* reset top to new space */ init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); |