Commit 38987363 authored by Benjamin REIS's avatar Benjamin REIS

fix implicit cast warnings

parent 6984378a
......@@ -226,7 +226,7 @@ void SalSubscribeOp::subscribe_refresher_listener_cb (belle_sip_refresher_t* ref
if (status_code == 503) { /*refresher returns 503 for IO error*/
reason = SalReasonIOError;
}
sal_error_info_set(&op->error_info, reason, "SIP", status_code,reason_phrase,NULL);
sal_error_info_set(&op->error_info, reason, "SIP", (int)status_code, reason_phrase, NULL);
op->root->callbacks.subscribe_response(op,sss, will_retry);
}else if (status_code==0){
op->root->callbacks.on_expire(op);
......@@ -365,7 +365,7 @@ void SalPublishOp::publish_refresher_listener_cb (belle_sip_refresher_t* refresh
sip_etag_string = belle_sip_header_get_unparsed_value(sip_etag);
}
op->set_entity_tag(sip_etag_string);
sal_error_info_set(&op->error_info,SalReasonUnknown, "SIP", status_code,reason_phrase,NULL);
sal_error_info_set(&op->error_info,SalReasonUnknown, "SIP", (int)status_code, reason_phrase, NULL);
op->assign_recv_headers((belle_sip_message_t*)response);
op->root->callbacks.on_publish_response(op);
}
......
......@@ -56,7 +56,7 @@ void SalRegisterOp::register_refresher_listener(belle_sip_refresher_t* refresher
/*only take first one for now*/
op->auth_info=sal_auth_info_create((belle_sip_auth_event_t*)(belle_sip_refresher_get_auth_events(refresher)->data));
}
sal_error_info_set(&op->error_info,SalReasonUnknown, "SIP", status_code,reason_phrase,NULL);
sal_error_info_set(&op->error_info,SalReasonUnknown, "SIP", (int)status_code, reason_phrase, NULL);
if (status_code>=200){
op->assign_recv_headers((belle_sip_message_t*)response);
}
......
......@@ -459,7 +459,7 @@ int Sal::add_listen_port(SalAddress* addr, bool_t is_tunneled) {
sal_transport_to_string(sal_address_get_transport(addr)));
}
if (lp) {
belle_sip_listening_point_set_keep_alive(lp,this->keep_alive);
belle_sip_listening_point_set_keep_alive(lp,(int)this->keep_alive);
result = belle_sip_provider_add_listening_point(this->prov,lp);
if (sal_address_get_transport(addr)==SalTransportTLS) {
set_tls_properties();
......@@ -526,7 +526,7 @@ void Sal::make_supported_header(){
const char *tag=(const char*)it->data;
size_t taglen=strlen(tag);
if (alltags==NULL || (written+taglen+1>=buflen)) alltags=reinterpret_cast<char *>(ms_realloc(alltags,(buflen=buflen*2)));
written+=snprintf(alltags+written,buflen-written,it->next ? "%s, " : "%s",tag);
written+=(size_t)snprintf(alltags+written,buflen-written,it->next ? "%s, " : "%s",tag);
}
if (alltags){
this->supported=belle_sip_header_create("Supported",alltags);
......@@ -606,7 +606,7 @@ void Sal::set_keepalive_period(unsigned int value) {
for (iterator=belle_sip_provider_get_listening_points(this->prov);iterator!=NULL;iterator=iterator->next) {
lp=(belle_sip_listening_point_t*)iterator->data;
if (this->use_tcp_tls_keep_alive || strcasecmp(belle_sip_listening_point_get_transport(lp),"udp")==0) {
belle_sip_listening_point_set_keep_alive(lp,this->keep_alive);
belle_sip_listening_point_set_keep_alive(lp,(int)this->keep_alive);
}
}
}
......@@ -713,7 +713,7 @@ int Sal::generate_uuid(char *uuid, size_t len) {
return -1;
}
for (i = 0; i < 6; i++)
written+=snprintf(uuid+written,len-written,"%2.2x", uuid_struct.node[i]);
written+=snprintf(uuid+written,len-(unsigned long)written,"%2.2x", uuid_struct.node[i]);
uuid[len-1]='\0';
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment