silence clang unused function warnings and get rid of some unused functions
This commit is contained in:
parent
fc25bbc23c
commit
cfd8d28bc8
|
@ -80,10 +80,19 @@ char const auth_internal_server_error[] = "Internal server error";
|
|||
static void auth_call_scheme_destructor(void *);
|
||||
static void auth_md5_hmac_key(auth_mod_t *am);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
HTABLE_PROTOS_WITH(auth_htable, aht, auth_passwd_t, usize_t, unsigned);
|
||||
HTABLE_BODIES_WITH(auth_htable, aht, auth_passwd_t, APW_HASH,
|
||||
usize_t, unsigned);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
/**Allocate an authentication module instance.
|
||||
*
|
||||
* The function auth_mod_alloc() allocates an authentication module object.
|
||||
|
|
|
@ -4124,7 +4124,18 @@ static int leg_route(nta_leg_t *leg,
|
|||
static int leg_callback_default(nta_leg_magic_t*, nta_leg_t*,
|
||||
nta_incoming_t*, sip_t const *);
|
||||
#define HTABLE_HASH_LEG(leg) ((leg)->leg_hash)
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
HTABLE_BODIES_WITH(leg_htable, lht, nta_leg_t, HTABLE_HASH_LEG, size_t, hash_value_t);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
su_inline
|
||||
hash_value_t hash_istring(char const *, char const *, hash_value_t);
|
||||
|
||||
|
@ -4881,6 +4892,7 @@ void leg_recv(nta_leg_t *leg, msg_t *msg, sip_t *sip, tport_t *tport)
|
|||
nta_incoming_destroy(irq);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/**Compare two SIP from/to fields.
|
||||
*
|
||||
* @retval nonzero if matching.
|
||||
|
@ -4897,6 +4909,7 @@ int addr_cmp(url_t const *a, url_t const *b)
|
|||
su_strcmp(a->url_port, b->url_port) ||
|
||||
su_strcmp(a->url_user, b->url_user);
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Get a leg by dialog.
|
||||
*
|
||||
|
@ -7207,9 +7220,18 @@ size_t incoming_mass_destroy(nta_agent_t *sa, incoming_queue_t *q)
|
|||
|
||||
#define HTABLE_HASH_ORQ(orq) ((orq)->orq_hash)
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
HTABLE_BODIES_WITH(outgoing_htable, oht, nta_outgoing_t, HTABLE_HASH_ORQ,
|
||||
size_t, hash_value_t);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
static int outgoing_features(nta_agent_t *agent, nta_outgoing_t *orq,
|
||||
msg_t *msg, sip_t *sip,
|
||||
tagi_t *tags);
|
||||
|
@ -10224,8 +10246,7 @@ su_inline void outgoing_destroy_resolver(nta_outgoing_t *orq)
|
|||
|
||||
assert(orq->orq_resolver);
|
||||
|
||||
if (sr->sr_query) /* Cancel resolver query */
|
||||
sres_query_bind(sr->sr_query, NULL, NULL), sr->sr_query = NULL;
|
||||
outgoing_cancel_resolver(orq);
|
||||
|
||||
su_free(orq->orq_agent->sa_home, sr);
|
||||
|
||||
|
|
|
@ -243,9 +243,19 @@ static int hc_recv(nth_client_t * hc, msg_t *msg, http_t * http);
|
|||
HTABLE_PROTOS_WITH(hc_htable, hct, nth_client_t, uintptr_t, size_t);
|
||||
|
||||
#define HTABLE_HASH_CLIENT(hc) ((uintptr_t)(hc)->hc_tport)
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
HTABLE_BODIES_WITH(hc_htable, hct, nth_client_t, HTABLE_HASH_CLIENT,
|
||||
uintptr_t, size_t);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
static url_string_t const *hc_request_complete(nth_client_t * hc,
|
||||
msg_t *msg, http_t * http,
|
||||
http_method_t method,
|
||||
|
|
|
@ -200,9 +200,6 @@ static char const __func__[] = "nth";
|
|||
static server_t *server_create(url_t const *url,
|
||||
tag_type_t tag, tag_value_t value, ...);
|
||||
void server_destroy(server_t *srv);
|
||||
su_inline int server_timer_init(server_t *srv);
|
||||
static void server_timer(su_root_magic_t *rm, su_timer_t *timer, server_t *srv);
|
||||
su_inline uint32_t server_now(server_t const *srv);
|
||||
static void server_request(server_t *srv, tport_t *tport, msg_t *msg,
|
||||
void *arg, su_time_t now);
|
||||
static nth_site_t **site_get_host(nth_site_t **, char const *host, char const *port);
|
||||
|
@ -775,44 +772,6 @@ void server_destroy(server_t *srv)
|
|||
su_home_unref(srv->srv_home);
|
||||
}
|
||||
|
||||
/** Initialize server timer. */
|
||||
su_inline
|
||||
int server_timer_init(server_t *srv)
|
||||
{
|
||||
if (0) {
|
||||
srv->srv_timer = su_timer_create(su_root_task(srv->srv_root), SERVER_TICK);
|
||||
return su_timer_set(srv->srv_timer, server_timer, srv);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Server timer routine.
|
||||
*/
|
||||
static
|
||||
void server_timer(su_root_magic_t *rm, su_timer_t *timer, server_t *srv)
|
||||
{
|
||||
uint32_t now;
|
||||
|
||||
su_timer_set(timer, server_timer, srv);
|
||||
|
||||
now = su_time_ms(su_now()); now += now == 0; srv->srv_now = now;
|
||||
|
||||
/* Xyzzy */
|
||||
|
||||
srv->srv_now = 0;
|
||||
}
|
||||
|
||||
/** Get current timestamp in milliseconds */
|
||||
su_inline
|
||||
uint32_t server_now(server_t const *srv)
|
||||
{
|
||||
if (srv->srv_now)
|
||||
return srv->srv_now;
|
||||
else
|
||||
return su_time_ms(su_now());
|
||||
}
|
||||
|
||||
/** Process incoming request message */
|
||||
static
|
||||
void server_request(server_t *srv,
|
||||
|
|
|
@ -63,7 +63,9 @@
|
|||
|
||||
#include <sofia-sip/su_wait.h>
|
||||
|
||||
#if 0
|
||||
su_inline int can_redirect(sip_contact_t const *m, sip_method_t method);
|
||||
#endif
|
||||
|
||||
/**@internal
|
||||
*
|
||||
|
@ -1259,6 +1261,7 @@ int nua_base_client_check_restart(nua_client_request_t *cr,
|
|||
return 0; /* This was a final response that cannot be restarted. */
|
||||
}
|
||||
|
||||
#if 0
|
||||
su_inline
|
||||
int can_redirect(sip_contact_t const *m, sip_method_t method)
|
||||
{
|
||||
|
@ -1274,6 +1277,7 @@ int can_redirect(sip_contact_t const *m, sip_method_t method)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @internal Add authorization data */
|
||||
static int nh_authorize(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
|
||||
|
|
|
@ -4590,12 +4590,6 @@ session_timer_set(nua_session_usage_t *ss, int uas)
|
|||
}
|
||||
}
|
||||
|
||||
su_inline int
|
||||
session_timer_has_been_set(struct session_timer const *t)
|
||||
{
|
||||
return t->timer_set;
|
||||
}
|
||||
|
||||
/* ======================================================================== */
|
||||
|
||||
/** Get SDP from a SIP message.
|
||||
|
|
|
@ -1705,9 +1705,18 @@ sres_resolver_destructor(void *arg)
|
|||
res->res_updcb(res->res_async, INVALID_SOCKET, INVALID_SOCKET);
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
HTABLE_BODIES_WITH(sres_qtable, qt, sres_query_t, SRES_QUERY_HASH,
|
||||
unsigned, size_t);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
/** Allocate a query structure */
|
||||
static
|
||||
sres_query_t *
|
||||
|
|
|
@ -648,9 +648,18 @@ int sres_cache_set_srv_priority(sres_cache_t *cache,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
HTABLE_BODIES_WITH(sres_htable, ht, sres_rr_hash_entry_t, SRES_HENTRY_HASH,
|
||||
unsigned, size_t);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
static inline
|
||||
int sres_heap_earlier_entry(sres_rr_hash_entry_t const *a,
|
||||
sres_rr_hash_entry_t const *b)
|
||||
|
@ -667,6 +676,11 @@ void sres_heap_set_entry(sres_rr_hash_entry_t **heap,
|
|||
heap[index] = entry;
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
HEAP_BODIES(static inline,
|
||||
sres_heap_t,
|
||||
sres_heap_,
|
||||
|
@ -675,3 +689,7 @@ HEAP_BODIES(static inline,
|
|||
sres_heap_set_entry,
|
||||
su_realloc,
|
||||
NULL);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
|
|
@ -203,9 +203,18 @@ su_inline void *timers_alloc(void *argument, void *memory, size_t size)
|
|||
return free(memory), NULL;
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
HEAP_BODIES(su_inline, su_timer_queue_t, timers_, su_timer_t *,
|
||||
timers_less, timers_set, timers_alloc, NULL);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
/**@internal Set the timer.
|
||||
*
|
||||
* @retval 0 when successful (always)
|
||||
|
|
|
@ -115,10 +115,10 @@ su_inline int tp_cmp(tport_t const *a, tport_t const *b)
|
|||
return memcmp(a->tp_addr, b->tp_addr, a->tp_addrlen);
|
||||
}
|
||||
|
||||
su_inline int tprb_is_inserted(tport_t const *a)
|
||||
{
|
||||
return a->tp_dad != 0 || a->tp_left != 0 || a->tp_right != 0;
|
||||
}
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
RBTREE_PROTOS(su_inline, tprb, tport_t);
|
||||
|
||||
|
@ -127,6 +127,10 @@ RBTREE_BODIES(su_inline, tprb, tport_t,
|
|||
TP_IS_RED, TP_SET_RED, TP_IS_BLACK, TP_SET_BLACK, TP_COPY_COLOR,
|
||||
tp_cmp, TP_INSERT, TP_REMOVE);
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
static void tplist_insert(tport_t **list, tport_t *tp)
|
||||
{
|
||||
if (*list == NULL)
|
||||
|
@ -311,12 +315,6 @@ inline int tport_is_shutdown(tport_t const *self)
|
|||
return self->tp_closed || self->tp_send_close || self->tp_recv_close;
|
||||
}
|
||||
|
||||
/** Test if transport is bound */
|
||||
su_inline int tport_is_bound(tport_t const *self)
|
||||
{
|
||||
return self->tp_protoname != NULL;
|
||||
}
|
||||
|
||||
/** Test if transport connection has been established. @NEW_1_12_5. */
|
||||
int tport_is_connected(tport_t const *self)
|
||||
{
|
||||
|
@ -348,12 +346,6 @@ su_inline unsigned tport_mtu(tport_t const *self)
|
|||
return self->tp_params->tpp_mtu;
|
||||
}
|
||||
|
||||
su_inline
|
||||
int tport_has_sigcomp(tport_t const *self)
|
||||
{
|
||||
return self->tp_name->tpn_comp != NULL;
|
||||
}
|
||||
|
||||
/** Set IP TOS for socket */
|
||||
void tport_set_tos(su_socket_t socket, su_addrinfo_t *ai, int tos)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue