diff --git a/libs/sofia-sip/libsofia-sip-ua/msg/msg_date.c b/libs/sofia-sip/libsofia-sip-ua/msg/msg_date.c index a665e9d495..5a8f354fa5 100644 --- a/libs/sofia-sip/libsofia-sip-ua/msg/msg_date.c +++ b/libs/sofia-sip/libsofia-sip-ua/msg/msg_date.c @@ -182,7 +182,7 @@ int time_d(char const **ss, issize_t msg_date_d(char const **ss, msg_time_t *date) { char const *s = *ss; - char const *wkday; + //char const *wkday; char const *tz; unsigned long day, year, hour, min, sec; int mon; @@ -190,7 +190,8 @@ issize_t msg_date_d(char const **ss, msg_time_t *date) if (!IS_TOKEN(*s) || !date) return -1; - wkday = s; skip_token(&s); if (*s == ',') s++; + //wkday = s; + skip_token(&s); if (*s == ',') s++; while (IS_LWS(*s)) s++; if (is_digit(*s)) { diff --git a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c index 543f0e135a..b96ec2ba5b 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nta/nta.c +++ b/libs/sofia-sip/libsofia-sip-ua/nta/nta.c @@ -2307,7 +2307,7 @@ int agent_init_via(nta_agent_t *self, tport_t *primaries, int use_maddr) /* Set via fields for the tports */ for (tp = primaries; tp; tp = tport_next(tp)) { - int maddr, first_via; + int maddr; tp_name_t tpn[1]; char const *comp = NULL; @@ -2339,8 +2339,6 @@ int agent_init_via(nta_agent_t *self, tport_t *primaries, int use_maddr) if (tport_has_tls(tp)) self->sa_tport_tls = 1; - first_via = 1; - ai = tport_get_address(tp); for (; ai; ai = ai->ai_next) { diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c index 032c0a04f2..a35669dd3b 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c @@ -1743,7 +1743,7 @@ static int nua_prack_client_request(nua_client_request_t *cr, nua_client_request_t *cri; int offer_sent = 0, answer_sent = 0, retval; int status = 0; char const *phrase = "PRACK Sent"; - uint32_t rseq = 0; + //uint32_t rseq = 0; if (du == NULL) /* Call terminated */ return nua_client_return(cr, SIP_481_NO_TRANSACTION, msg); @@ -1754,8 +1754,8 @@ static int nua_prack_client_request(nua_client_request_t *cr, cri = du->du_cr; - if (sip->sip_rack) - rseq = sip->sip_rack->ra_response; +// if (sip->sip_rack) +// rseq = sip->sip_rack->ra_response; if (cri->cr_offer_recv && !cri->cr_answer_sent) { if (nh->nh_soa == NULL) diff --git a/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c b/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c index b6e0c01385..6455f4b5c8 100644 --- a/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c +++ b/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c @@ -1883,12 +1883,11 @@ static char *next(char **message, const char *sep, const char *strip) static int parsing_error(sdp_parser_t *p, char const *fmt, ...) { - int n; va_list ap; va_start(ap, fmt); memset(p->pr_error, 0, sizeof(p->pr_error)); - n = vsnprintf(p->pr_error, sizeof(p->pr_error), fmt, ap); + vsnprintf(p->pr_error, sizeof(p->pr_error), fmt, ap); va_end(ap); p->pr_ok = 0; diff --git a/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c b/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c index e2852b446b..e94c6b6758 100644 --- a/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c +++ b/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c @@ -685,9 +685,8 @@ static void printing_error(sdp_printer_t *p, const char *fmt, ...) va_list ap; if (p->pr_ok) { - int n; va_start(ap, fmt); - n = vsnprintf(p->pr_buffer, p->pr_bsiz, fmt, ap); + vsnprintf(p->pr_buffer, p->pr_bsiz, fmt, ap); va_end(ap); } diff --git a/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c b/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c index e00d3912d8..4152669bfd 100644 --- a/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c +++ b/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c @@ -1010,7 +1010,6 @@ int soa_sdp_mode_set(sdp_session_t const *user, int retval = 0, i, j; int hold_all; int inactive_all; - int inactive = 0; char const *hold_media = NULL; sdp_mode_t send_mode, recv_mode; @@ -1029,7 +1028,6 @@ int soa_sdp_mode_set(sdp_session_t const *user, for (sm = session->sdp_media; sm; sm = sm->m_next, rm = rm_next, i++) { rm_next = rm ? rm->m_next : NULL; - inactive = 0; if (sm->m_rejected) continue; diff --git a/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c b/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c index e494571f54..d719a68b90 100644 --- a/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c +++ b/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c @@ -3632,10 +3632,10 @@ sres_decode_msg(sres_resolver_t *res, * for the side effects in m */ for (i = 0; i < m->m_qdcount; i++) { char name[1024]; - uint16_t qtype, qclass; + //uint16_t qtype, qclass; m_get_domain(name, sizeof(name), m, 0); /* Query domain */ - qtype = m_get_uint16(m); /* Query type */ - qclass = m_get_uint16(m); /* Query class */ + //qtype = m_get_uint16(m); /* Query type */ + //qclass = m_get_uint16(m); /* Query class */ } if (m->m_error) { diff --git a/libs/sofia-sip/libsofia-sip-ua/stun/stun.c b/libs/sofia-sip/libsofia-sip-ua/stun/stun.c index 09ecff41cb..d2fabe3329 100644 --- a/libs/sofia-sip/libsofia-sip-ua/stun/stun.c +++ b/libs/sofia-sip/libsofia-sip-ua/stun/stun.c @@ -673,12 +673,12 @@ static stun_request_t *stun_request_create(stun_discovery_t *sd) void stun_request_destroy(stun_request_t *req) { - stun_handle_t *sh; + //stun_handle_t *sh; assert(req); enter; - sh = req->sr_handle; + //sh = req->sr_handle; if (x_is_inserted(req, sr)) x_remove(req, sr); @@ -1140,14 +1140,14 @@ static stun_discovery_t *stun_discovery_create(stun_handle_t *sh, static int stun_discovery_destroy(stun_discovery_t *sd) { - stun_handle_t *sh; + //stun_handle_t *sh; enter; if (!sd) return errno = EFAULT, -1; - sh = sd->sd_handle; + //sh = sd->sd_handle; if (sd->sd_timer) su_timer_destroy(sd->sd_timer), sd->sd_timer = NULL; @@ -1883,7 +1883,7 @@ static int process_test_lifetime(stun_request_t *req, stun_msg_t *binding_respon stun_discovery_t *sd = req->sr_discovery; stun_request_t *new; stun_handle_t *sh = req->sr_handle; - su_localinfo_t *li; + //su_localinfo_t *li; su_sockaddr_t *sa; su_timer_t *sockfdy_timer = NULL; su_socket_t sockfdy = sd->sd_socket2; @@ -1954,7 +1954,7 @@ static int process_test_lifetime(stun_request_t *req, stun_msg_t *binding_respon /* Rock, we come from sockfdx */ process_binding_request(req, binding_response); - li = &req->sr_localinfo; + //li = &req->sr_localinfo; sa = req->sr_local_addr; stun_free_message(binding_response); @@ -1981,7 +1981,7 @@ static int process_test_lifetime(stun_request_t *req, stun_msg_t *binding_respon static int action_bind(stun_request_t *req, stun_msg_t *binding_response) { - su_localinfo_t *li = NULL; + //su_localinfo_t *li = NULL; su_sockaddr_t *sa = NULL; stun_discovery_t *sd = req->sr_discovery; stun_handle_t *sh = req->sr_handle; @@ -1992,7 +1992,7 @@ static int action_bind(stun_request_t *req, stun_msg_t *binding_response) process_binding_request(req, binding_response); - li = &req->sr_localinfo; + //li = &req->sr_localinfo; sa = req->sr_local_addr; memcpy(sd->sd_addr_seen_outside, sa, sizeof(su_sockaddr_t)); @@ -3039,7 +3039,7 @@ int stun_process_request(su_socket_t s, stun_msg_t *req, su_sockaddr_t mod_addr[1] = {{ 0 }}, src_addr[1] = {{ 0 }}, chg_addr[1] = {{ 0 }}; stun_attr_t *tmp, m_attr[1], s_attr[1], c_attr[1], **p; su_sockaddr_t to_addr; - int c, i; + int i; tmp = stun_get_attr(req->stun_attr, RESPONSE_ADDRESS); @@ -3071,20 +3071,20 @@ int stun_process_request(su_socket_t s, stun_msg_t *req, /* SOURCE-ADDRESS depends on CHANGE_REQUEST */ tmp = stun_get_attr(req->stun_attr, CHANGE_REQUEST); if (!tmp) { - c = 0; + //c = 0; } else { switch (((stun_attr_changerequest_t *) tmp->pattr)->value) { case STUN_CR_CHANGE_IP: - c = 1; + //c = 1; break; case STUN_CR_CHANGE_PORT: - c = 2; + //c = 2; break; case STUN_CR_CHANGE_IP | STUN_CR_CHANGE_PORT: /* bitwise or */ - c = 3; + //c = 3; break; default: diff --git a/libs/sofia-sip/libsofia-sip-ua/stun/stun_dns.c b/libs/sofia-sip/libsofia-sip-ua/stun/stun_dns.c index bfbfe77e41..86ef0b2c37 100644 --- a/libs/sofia-sip/libsofia-sip-ua/stun/stun_dns.c +++ b/libs/sofia-sip/libsofia-sip-ua/stun/stun_dns.c @@ -163,7 +163,10 @@ stun_dns_lookup_t *stun_dns_lookup(stun_magic_t *magic, query = sres_query(self->stun_sres, priv_sres_cb, self, sres_type_srv, srvname); - } + if (query) { + /* TODO Just so compiler doesn't give error */ + } +} else { su_free(NULL, self), self = NULL; } diff --git a/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c b/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c index edc47e5da9..51259ade1a 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c +++ b/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c @@ -429,13 +429,13 @@ void *sub_alloc(su_home_t *home, if (sub == NULL || 3 * sub->sub_used > 2 * sub->sub_n) { /* Resize the hash table */ - size_t i, n, n2, used; + size_t i, n, n2; su_block_t *b2; if (sub) - n = home->suh_blocks->sub_n, n2 = 4 * n + 3, used = sub->sub_used; + n = home->suh_blocks->sub_n, n2 = 4 * n + 3; //, used = sub->sub_used; else - n = 0, n2 = SUB_N, used = 0; + n = 0, n2 = SUB_N; //, used = 0; #if 0 printf("su_alloc(home = %p): realloc block hash of size %d\n", home, n2); diff --git a/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c b/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c index de7279e493..523599c7a7 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c +++ b/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c @@ -194,7 +194,8 @@ static void li_sort(su_localinfo_t *i, su_localinfo_t **rresult); int su_getlocalinfo(su_localinfo_t const *hints, su_localinfo_t **return_localinfo) { - int error = 0, ip4 = 0, ip6 = 0; + int error = 0, ip4 = 0; + int ip6 = 0; su_localinfo_t *result = NULL, **rr = &result; su_localinfo_t hh[1] = {{ 0 }}; @@ -231,7 +232,11 @@ int su_getlocalinfo(su_localinfo_t const *hints, break; case 0: - ip6 = ip4 = 1; + ip4 = 1; +#if SU_HAVE_IN6 + ip6 = 1; +#endif + break; default: @@ -260,6 +265,9 @@ int su_getlocalinfo(su_localinfo_t const *hints, } #endif + if (ip6) { + /* Required to make compiler happy */ + } if (!result) error = ELI_NOADDRESS; diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport.c index a33b77f3e2..8ebab4fd31 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport.c @@ -1595,7 +1595,7 @@ int tport_bind_server(tport_master_t *mr, { char hostname[TPORT_HOSTPORTSIZE]; char const *canon = NULL, *host, *service; - int error = 0, not_supported, family = 0; + int error = 0, family = 0; tport_primary_t *pri = NULL, **tbf; su_addrinfo_t *ai, *res = NULL; unsigned port, port0, port1, old; @@ -1691,8 +1691,6 @@ int tport_bind_server(tport_master_t *mr, break; } - not_supported = 0; - if (port0 == 0 && port == 0) { port = port1 = ntohs(su->su_port); assert(public != tport_type_server || port != 0); diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_stun.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_stun.c index 55f67a9e2c..3233e1c616 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_stun.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_stun.c @@ -170,10 +170,10 @@ void tport_stun_bind_cb(tport_primary_t *pri, stun_action_t action, stun_state_t event) { - tport_master_t *mr; + //tport_master_t *mr; SU_DEBUG_3(("%s: %s\n", __func__, stun_str_state(event))); - mr = pri->pri_master; + //mr = pri->pri_master; if (event == stun_discovery_done) { tport_stun_bind_done(pri, sh, sd); diff --git a/libs/sofia-sip/libsofia-sip-ua/url/url.c b/libs/sofia-sip/libsofia-sip-ua/url/url.c index bef523e5c9..71544735e1 100644 --- a/libs/sofia-sip/libsofia-sip-ua/url/url.c +++ b/libs/sofia-sip/libsofia-sip-ua/url/url.c @@ -567,7 +567,7 @@ static int _url_d(url_t *url, char *s) { size_t n, p; - char *s0, rest_c, *host, *user; + char rest_c, *host, *user; int have_authority = 1; memset(url, 0, sizeof(*url)); @@ -578,8 +578,6 @@ int _url_d(url_t *url, char *s) return 0; } - s0 = s; - n = strcspn(s, ":/?#"); if (n && s[n] == ':') {