Fix compilation warnings when building tester for Windows 10.

This commit is contained in:
Ghislain MARY 2015-10-01 15:33:24 +02:00
parent 7ce9483bb6
commit 90427700c2
18 changed files with 163 additions and 163 deletions

View file

@ -96,10 +96,10 @@ void call_stats_updated(LinphoneCore *lc, LinphoneCall *call, const LinphoneCall
counters->current_audio_download_bandwidth = counters->audio_download_bandwidth + index;
counters->current_audio_upload_bandwidth = counters->audio_upload_bandwidth +index;
counters->audio_download_bandwidth[index] = linphone_call_get_audio_stats(call)->download_bandwidth;
counters->audio_upload_bandwidth[index] = linphone_call_get_audio_stats(call)->upload_bandwidth;
counters->video_download_bandwidth[index] = linphone_call_get_video_stats(call)->download_bandwidth;
counters->video_upload_bandwidth[index] = linphone_call_get_video_stats(call)->upload_bandwidth;
counters->audio_download_bandwidth[index] = (int)linphone_call_get_audio_stats(call)->download_bandwidth;
counters->audio_upload_bandwidth[index] = (int)linphone_call_get_audio_stats(call)->upload_bandwidth;
counters->video_download_bandwidth[index] = (int)linphone_call_get_video_stats(call)->download_bandwidth;
counters->video_upload_bandwidth[index] = (int)linphone_call_get_video_stats(call)->upload_bandwidth;
}
}
@ -407,11 +407,11 @@ void simple_call_base(bool_t enable_multicast_recv_side) {
linphone_core_manager_destroy(marie);
}
static void simple_call() {
static void simple_call(void) {
simple_call_base(FALSE);
}
static void automatic_call_termination() {
static void automatic_call_termination(void) {
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
@ -465,7 +465,7 @@ static void call_with_timeouted_bye(void) {
linphone_core_manager_destroy(pauline);
}
static void direct_call_over_ipv6(){
static void direct_call_over_ipv6(void){
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
@ -502,7 +502,7 @@ static void direct_call_over_ipv6(){
}else ms_warning("Test skipped, no ipv6 available");
}
static void call_outbound_with_multiple_proxy() {
static void call_outbound_with_multiple_proxy(void) {
LinphoneCoreManager* marie = linphone_core_manager_new2( "marie_rc", FALSE);
LinphoneCoreManager* pauline = linphone_core_manager_new2( "pauline_tcp_rc", FALSE);
@ -544,7 +544,7 @@ static void call_outbound_with_multiple_proxy() {
}
#if 0 /* TODO: activate test when the implementation is ready */
static void multiple_answers_call() {
static void multiple_answers_call(void) {
/* Scenario is this: pauline calls marie, which is registered 2 times.
Both linphones answer at the same time, and only one should get the
call running, the other should be terminated */
@ -683,9 +683,9 @@ static void call_with_specified_codec_bitrate(void) {
/*wait a bit that bitstreams are stabilized*/
wait_for_until(marie->lc, pauline->lc, NULL, 0, 2000);
BC_ASSERT_LOWER(linphone_core_manager_get_mean_audio_down_bw(marie), min_bw+5+min_bw*.1, int, "%i");
BC_ASSERT_LOWER(linphone_core_manager_get_mean_audio_down_bw(marie), (int)(min_bw+5+min_bw*.1), int, "%i");
BC_ASSERT_GREATER(linphone_core_manager_get_mean_audio_down_bw(marie), 10, int, "%i"); /*check that at least something is received */
BC_ASSERT_GREATER(linphone_core_manager_get_mean_audio_down_bw(pauline), (max_bw-5-max_bw*.1), int, "%i");
BC_ASSERT_GREATER(linphone_core_manager_get_mean_audio_down_bw(pauline), (int)(max_bw-5-max_bw*.1), int, "%i");
end_call(pauline, marie);
end:
@ -1243,7 +1243,7 @@ void call_paused_resumed_base(bool_t multicast) {
/*since RTCP streams are reset when call is paused/resumed, there should be no loss at all*/
stats = rtp_session_get_stats(call_pauline->sessions->rtp_session);
BC_ASSERT_EQUAL(stats->cum_packet_loss, 0, int, "%d");
BC_ASSERT_EQUAL((int)stats->cum_packet_loss, 0, int, "%d");
end_call(pauline, marie);
end:
@ -1254,7 +1254,7 @@ static void call_paused_resumed(void) {
call_paused_resumed_base(FALSE);
}
static void call_paused_by_both() {
static void call_paused_by_both(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
LinphoneCall* call_pauline, *call_marie;
@ -1310,7 +1310,7 @@ static void call_paused_by_both() {
/*since RTCP streams are reset when call is paused/resumed, there should be no loss at all*/
stats = rtp_session_get_stats(call_pauline->sessions->rtp_session);
BC_ASSERT_EQUAL(stats->cum_packet_loss, 0, int, "%d");
BC_ASSERT_EQUAL((int)stats->cum_packet_loss, 0, int, "%d");
end_call(marie, pauline);
@ -1321,7 +1321,7 @@ end:
}
/*this test makes sure that pause/resume will not bring up video by accident*/
static void call_paused_resumed_with_video(){
static void call_paused_resumed_with_video(void){
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
LinphoneCall* call_pauline, *call_marie;
@ -1385,8 +1385,8 @@ end:
BC_ASSERT_TRUE(wait_for_until(pauline->lc, marie->lc, &pauline->stat.number_of_rtcp_sent, rtcp_count_current+1, 10000)); \
stats = rtp_session_get_stats(call_pauline->audiostream->ms.sessions.rtp_session); \
loss_percentage = stats->cum_packet_loss * 100.f / (stats->packet_recv + stats->cum_packet_loss); \
BC_ASSERT_GREATER(loss_percentage, .75 * params.loss_rate, float, "%f"); \
BC_ASSERT_LOWER(loss_percentage , 1.25 * params.loss_rate, float, "%f")
BC_ASSERT_GREATER(loss_percentage, .75f * params.loss_rate, float, "%f"); \
BC_ASSERT_LOWER(loss_percentage , 1.25f * params.loss_rate, float, "%f")
static void call_paused_resumed_with_loss(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
@ -1446,7 +1446,7 @@ bool_t pause_call_1(LinphoneCoreManager* mgr_1,LinphoneCall* call_1,LinphoneCore
return linphone_call_get_state(call_1) == LinphoneCallPaused && linphone_call_get_state(call_2)==LinphoneCallPausedByRemote;
}
#if 0
void concurrent_paused_resumed_base() {
void concurrent_paused_resumed_base(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
LinphoneCall* call_pauline,call_marie;
@ -1517,7 +1517,7 @@ static void call_paused_resumed_from_callee(void) {
/*since RTCP streams are reset when call is paused/resumed, there should be no loss at all*/
stats = rtp_session_get_stats(call_marie->sessions->rtp_session);
BC_ASSERT_EQUAL(stats->cum_packet_loss, 0, int, "%d");
BC_ASSERT_EQUAL((int)stats->cum_packet_loss, 0, int, "%d");
end_call(pauline, marie);
end:
@ -2318,49 +2318,49 @@ static void call_with_privacy2(void) {
linphone_core_manager_destroy(pauline);
}
static void srtp_call() {
static void srtp_call(void) {
call_base(LinphoneMediaEncryptionSRTP,FALSE,FALSE,LinphonePolicyNoFirewall,FALSE);
}
static void zrtp_call() {
static void zrtp_call(void) {
call_base(LinphoneMediaEncryptionZRTP,FALSE,FALSE,LinphonePolicyNoFirewall,FALSE);
}
static void zrtp_sas_call() {
static void zrtp_sas_call(void) {
call_base_with_configfile(LinphoneMediaEncryptionZRTP,FALSE,FALSE,LinphonePolicyNoFirewall,FALSE, "marie_zrtp_b256_rc", "pauline_zrtp_b256_rc");
call_base_with_configfile(LinphoneMediaEncryptionZRTP,FALSE,FALSE,LinphonePolicyNoFirewall,FALSE, "marie_zrtp_b256_rc", "pauline_tcp_rc");
}
static void zrtp_cipher_call() {
static void zrtp_cipher_call(void) {
call_base_with_configfile(LinphoneMediaEncryptionZRTP,FALSE,FALSE,LinphonePolicyNoFirewall,FALSE, "marie_zrtp_srtpsuite_aes256_rc", "pauline_zrtp_srtpsuite_aes256_rc");
call_base_with_configfile(LinphoneMediaEncryptionZRTP,FALSE,FALSE,LinphonePolicyNoFirewall,FALSE, "marie_zrtp_aes256_rc", "pauline_zrtp_aes256_rc");
call_base_with_configfile(LinphoneMediaEncryptionZRTP,FALSE,FALSE,LinphonePolicyNoFirewall,FALSE, "marie_zrtp_aes256_rc", "pauline_tcp_rc");
}
static void zrtp_video_call() {
static void zrtp_video_call(void) {
call_base(LinphoneMediaEncryptionZRTP,TRUE,FALSE,LinphonePolicyNoFirewall,FALSE);
}
static void dtls_srtp_call() {
static void dtls_srtp_call(void) {
call_base(LinphoneMediaEncryptionDTLS,FALSE,FALSE,LinphonePolicyNoFirewall,FALSE);
}
static void dtls_srtp_call_with_media_realy() {
static void dtls_srtp_call_with_media_realy(void) {
call_base(LinphoneMediaEncryptionDTLS,FALSE,TRUE,LinphonePolicyNoFirewall,FALSE);
}
static void dtls_srtp_ice_call() {
static void dtls_srtp_ice_call(void) {
call_base(LinphoneMediaEncryptionDTLS,FALSE,FALSE,LinphonePolicyUseIce,FALSE);
}
#ifdef VIDEO_ENABLED
static void dtls_srtp_video_call() {
static void dtls_srtp_video_call(void) {
call_base(LinphoneMediaEncryptionDTLS,TRUE,FALSE,LinphonePolicyNoFirewall,FALSE);
}
static void dtls_srtp_ice_video_call() {
static void dtls_srtp_ice_video_call(void) {
call_base(LinphoneMediaEncryptionDTLS,TRUE,FALSE,LinphonePolicyUseIce,FALSE);
}
static void dtls_srtp_ice_video_call_with_relay() {
static void dtls_srtp_ice_video_call_with_relay(void) {
call_base(LinphoneMediaEncryptionDTLS,TRUE,TRUE,LinphonePolicyUseIce,FALSE);
}
#endif
@ -3214,15 +3214,15 @@ static void call_rejected_because_wrong_credentials_with_params(const char* user
linphone_core_manager_destroy(marie);
}
static void call_rejected_because_wrong_credentials() {
static void call_rejected_because_wrong_credentials(void) {
call_rejected_because_wrong_credentials_with_params(NULL,TRUE);
}
static void call_rejected_without_403_because_wrong_credentials() {
static void call_rejected_without_403_because_wrong_credentials(void) {
call_rejected_because_wrong_credentials_with_params("tester-no-403",TRUE);
}
static void call_rejected_without_403_because_wrong_credentials_no_auth_req_cb() {
static void call_rejected_without_403_because_wrong_credentials_no_auth_req_cb(void) {
call_rejected_because_wrong_credentials_with_params("tester-no-403",FALSE);
}
@ -3330,14 +3330,14 @@ void check_media_direction(LinphoneCoreManager* mgr, LinphoneCall *call, MSList*
switch (video_dir) {
case LinphoneMediaDirectionInactive:
BC_ASSERT_LOWER(linphone_call_get_video_stats(call)->upload_bandwidth, 5, int, "%i");
BC_ASSERT_LOWER((int)linphone_call_get_video_stats(call)->upload_bandwidth, 5, int, "%i");
break;
case LinphoneMediaDirectionSendOnly:
expected_recv_iframe = 0;
BC_ASSERT_LOWER(linphone_call_get_video_stats(call)->download_bandwidth, 5, int, "%i");
BC_ASSERT_LOWER((int)linphone_call_get_video_stats(call)->download_bandwidth, 5, int, "%i");
break;
case LinphoneMediaDirectionRecvOnly:
BC_ASSERT_LOWER(linphone_call_get_video_stats(call)->upload_bandwidth, 5, int, "%i");
BC_ASSERT_LOWER((int)linphone_call_get_video_stats(call)->upload_bandwidth, 5, int, "%i");
case LinphoneMediaDirectionSendRecv:
expected_recv_iframe = 1;
break;
@ -3452,7 +3452,7 @@ static void accept_call_in_send_only_with_ice(void) {
accept_call_in_send_base(TRUE);
}
void two_accepted_call_in_send_only() {
void two_accepted_call_in_send_only(void) {
LinphoneCoreManager *pauline, *marie, *laure;
MSList *lcs=NULL;
@ -3730,7 +3730,7 @@ end:
linphone_core_manager_destroy(pauline);
}
static void incoming_invite_with_invalid_sdp() {
static void incoming_invite_with_invalid_sdp(void) {
LinphoneCoreManager* caller = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* callee = linphone_core_manager_new( "marie_rc");
LinphoneCallTestParams caller_test_params = {0}, callee_test_params = {0};
@ -3747,7 +3747,7 @@ static void incoming_invite_with_invalid_sdp() {
linphone_core_manager_destroy(caller);
}
static void outgoing_invite_with_invalid_sdp() {
static void outgoing_invite_with_invalid_sdp(void) {
LinphoneCoreManager* caller = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* callee = linphone_core_manager_new( "marie_rc");
LinphoneCallTestParams caller_test_params = {0}, callee_test_params = {0};
@ -3766,7 +3766,7 @@ static void outgoing_invite_with_invalid_sdp() {
linphone_core_manager_destroy(caller);
}
static void incoming_reinvite_with_invalid_ack_sdp(){
static void incoming_reinvite_with_invalid_ack_sdp(void){
#ifdef VIDEO_ENABLED
LinphoneCoreManager* caller = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* callee = linphone_core_manager_new( "marie_rc");
@ -3806,7 +3806,7 @@ static void incoming_reinvite_with_invalid_ack_sdp(){
#endif
}
static void outgoing_reinvite_with_invalid_ack_sdp() {
static void outgoing_reinvite_with_invalid_ack_sdp(void) {
#ifdef VIDEO_ENABLED
LinphoneCoreManager* caller = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* callee = linphone_core_manager_new( "marie_rc");
@ -3844,7 +3844,7 @@ static void outgoing_reinvite_with_invalid_ack_sdp() {
}
static void call_with_paused_no_sdp_on_resume() {
static void call_with_paused_no_sdp_on_resume(void) {
int dummy=0;
LinphoneCoreManager* marie;
LinphoneCoreManager* pauline;
@ -3966,15 +3966,15 @@ static void early_media_without_sdp_in_200_base( bool_t use_video, bool_t use_ic
linphone_core_manager_destroy(pauline);
}
static void call_with_early_media_and_no_sdp_in_200_with_video(){
static void call_with_early_media_and_no_sdp_in_200_with_video(void){
early_media_without_sdp_in_200_base(TRUE, FALSE);
}
static void call_with_early_media_and_no_sdp_in_200(){
static void call_with_early_media_and_no_sdp_in_200(void){
early_media_without_sdp_in_200_base(FALSE, FALSE);
}
static void call_with_early_media_ice_and_no_sdp_in_200(){
static void call_with_early_media_ice_and_no_sdp_in_200(void){
early_media_without_sdp_in_200_base(FALSE, TRUE);
}
@ -4154,26 +4154,26 @@ static void video_call_with_re_invite_inactive_followed_by_re_invite_base(Linpho
linphone_core_manager_destroy(pauline);
}
static void video_call_with_re_invite_inactive_followed_by_re_invite() {
static void video_call_with_re_invite_inactive_followed_by_re_invite(void) {
video_call_with_re_invite_inactive_followed_by_re_invite_base(LinphoneMediaEncryptionNone,FALSE);
}
static void video_call_with_re_invite_inactive_followed_by_re_invite_no_sdp() {
static void video_call_with_re_invite_inactive_followed_by_re_invite_no_sdp(void) {
video_call_with_re_invite_inactive_followed_by_re_invite_base(LinphoneMediaEncryptionNone, TRUE);
}
static void srtp_video_call_with_re_invite_inactive_followed_by_re_invite() {
static void srtp_video_call_with_re_invite_inactive_followed_by_re_invite(void) {
if (ms_srtp_supported())
video_call_with_re_invite_inactive_followed_by_re_invite_base(LinphoneMediaEncryptionSRTP,FALSE);
else
ms_message("srtp_video_call_with_re_invite_inactive_followed_by_re_invite skipped, missing srtp support");
}
static void srtp_video_call_with_re_invite_inactive_followed_by_re_invite_no_sdp() {
static void srtp_video_call_with_re_invite_inactive_followed_by_re_invite_no_sdp(void) {
if (ms_srtp_supported())
video_call_with_re_invite_inactive_followed_by_re_invite_base(LinphoneMediaEncryptionSRTP, TRUE);
else
ms_message("srtp_video_call_with_re_invite_inactive_followed_by_re_invite_no_sdp skipped, missing srtp support");
}
static void video_call_ice_params() {
static void video_call_ice_params(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
@ -4537,7 +4537,7 @@ static int rtptm_on_send(RtpTransportModifier *rtptm, mblk_t *msg) {
if (rtp->version == 0) {
// This is probably a STUN packet, so don't count it (oRTP won't) and don't encrypt it either
return msgdsize(msg);
return (int)msgdsize(msg);
}
// Mediastream can create a mblk_t with only the RTP header and setting the b_cont pointer to the actual RTP content buffer
@ -4555,7 +4555,7 @@ static int rtptm_on_send(RtpTransportModifier *rtptm, mblk_t *msg) {
data->packetSentCount += 1;
/* /!\ DO NOT RETURN 0 or the packet will never leave /!\ */
return msgdsize(msg);
return (int)msgdsize(msg);
}
// Callback called when a packet is on it's way to be received
@ -4569,7 +4569,7 @@ static int rtptm_on_receive(RtpTransportModifier *rtptm, mblk_t *msg) {
if (rtp->version == 0) {
// This is probably a STUN packet, so don't count it (oRTP won't) and don't decrypt it either
return msgdsize(msg);
return (int)msgdsize(msg);
}
// On the receiving side, there is no need for a msgpullup, the mblk_t contains the header and the payload in the same buffer
@ -4584,7 +4584,7 @@ static int rtptm_on_receive(RtpTransportModifier *rtptm, mblk_t *msg) {
data->packetReceivedCount += 1;
/* /!\ DO NOT RETURN 0 or the packet will be dropped /!\ */
return msgdsize(msg);
return (int)msgdsize(msg);
}
// This callback is called when the transport modifier is being destroyed
@ -4705,7 +4705,7 @@ static void custom_rtp_modifier(bool_t pauseResumeTest, bool_t recordTest) {
/*since RTCP streams are reset when call is paused/resumed, there should be no loss at all*/
stats = rtp_session_get_stats(call_pauline->sessions->rtp_session);
BC_ASSERT_EQUAL(stats->cum_packet_loss, 0, int, "%d");
BC_ASSERT_EQUAL((int)stats->cum_packet_loss, 0, int, "%d");
end_call(pauline, marie);
} else if (recordTest) {
@ -4857,7 +4857,7 @@ static void call_with_network_switch_and_ice(void){
#ifdef CALL_LOGS_STORAGE_ENABLED
static void call_logs_if_no_db_set() {
static void call_logs_if_no_db_set(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* laure = linphone_core_manager_new("laure_call_logs_rc");
BC_ASSERT_TRUE(ms_list_size(laure->lc->call_logs) == 10);
@ -4871,7 +4871,7 @@ static void call_logs_if_no_db_set() {
linphone_core_manager_destroy(laure);
}
static void call_logs_migrate() {
static void call_logs_migrate(void) {
LinphoneCoreManager* laure = linphone_core_manager_new("laure_call_logs_rc");
char *logs_db = create_filepath(bc_tester_get_writable_dir_prefix(), "call_logs", "db");
int i = 0;
@ -4922,7 +4922,7 @@ static void call_logs_migrate() {
linphone_core_manager_destroy(laure);
}
static void call_logs_sqlite_storage() {
static void call_logs_sqlite_storage(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
char *logs_db = create_filepath(bc_tester_get_writable_dir_prefix(), "call_logs", "db");
@ -5004,7 +5004,7 @@ static void call_with_http_proxy(void) {
BC_ASSERT_PTR_NOT_NULL(res);
if (!res) goto end;
BC_ASSERT_EQUAL(err=getnameinfo(res->ai_addr, res->ai_addrlen, ip, sizeof(ip)-1, NULL, 0, NI_NUMERICHOST), 0, int, "%i");
BC_ASSERT_EQUAL(err=getnameinfo(res->ai_addr, (socklen_t)res->ai_addrlen, ip, sizeof(ip)-1, NULL, 0, NI_NUMERICHOST), 0, int, "%i");
if (err != 0){
ms_error("call_with_http_proxy(): getnameinfo() error: %s", gai_strerror(err));
goto end;

View file

@ -72,7 +72,7 @@ void send_dtmf_base(LinphoneCoreManager **pmarie, LinphoneCoreManager **ppauline
linphone_call_send_dtmfs(marie_call, dtmf_seq);
/*wait for the DTMF sequence to be received from pauline*/
BC_ASSERT_TRUE(wait_for_until(marie->lc, pauline->lc, &pauline->stat.dtmf_count, dtmf_count_prev + strlen(dtmf_seq), 10000 + dtmf_delay_ms * strlen(dtmf_seq)));
BC_ASSERT_TRUE(wait_for_until(marie->lc, pauline->lc, &pauline->stat.dtmf_count, (int)(dtmf_count_prev + strlen(dtmf_seq)), (int)(10000 + dtmf_delay_ms * strlen(dtmf_seq))));
expected = (dtmf!='\0')?ms_strdup_printf("%c%s",dtmf,dtmf_seq):ms_strdup(dtmf_seq);
}
@ -102,38 +102,38 @@ void send_dtmf_cleanup(LinphoneCoreManager *marie, LinphoneCoreManager *pauline)
linphone_core_manager_destroy(pauline);
}
static void send_dtmf_rfc2833() {
static void send_dtmf_rfc2833(void) {
LinphoneCoreManager *marie, *pauline;
send_dtmf_base(&marie, &pauline, TRUE,FALSE,'1',NULL,FALSE);
send_dtmf_cleanup(marie, pauline);
}
static void send_dtmf_sip_info() {
static void send_dtmf_sip_info(void) {
LinphoneCoreManager *marie, *pauline;
send_dtmf_base(&marie, &pauline, FALSE,TRUE,'#',NULL,FALSE);
send_dtmf_cleanup(marie, pauline);
}
static void send_dtmfs_sequence_rfc2833() {
static void send_dtmfs_sequence_rfc2833(void) {
LinphoneCoreManager *marie, *pauline;
send_dtmf_base(&marie, &pauline, TRUE,FALSE,'\0',"1230#",FALSE);
send_dtmf_cleanup(marie, pauline);
}
static void send_dtmfs_sequence_sip_info() {
static void send_dtmfs_sequence_sip_info(void) {
LinphoneCoreManager *marie, *pauline;
send_dtmf_base(&marie, &pauline, FALSE,TRUE,'\0',"1230#",FALSE);
send_dtmf_cleanup(marie, pauline);
}
static void send_dtmfs_sequence_not_ready() {
static void send_dtmfs_sequence_not_ready(void) {
LinphoneCoreManager *marie;
marie = linphone_core_manager_new( "marie_rc");
BC_ASSERT_EQUAL(linphone_call_send_dtmfs(linphone_core_get_current_call(marie->lc), "123"), -1, int, "%d");
linphone_core_manager_destroy(marie);
}
static void send_dtmfs_sequence_call_state_changed() {
static void send_dtmfs_sequence_call_state_changed(void) {
LinphoneCoreManager *marie, *pauline;
LinphoneCall *marie_call = NULL;
send_dtmf_base(&marie, &pauline, FALSE,TRUE,'\0',NULL,FALSE);
@ -156,7 +156,7 @@ static void send_dtmfs_sequence_call_state_changed() {
send_dtmf_cleanup(marie, pauline);
}
static void send_dtmf_rfc2833_opus() {
static void send_dtmf_rfc2833_opus(void) {
LinphoneCoreManager *marie, *pauline;
send_dtmf_base(&marie, &pauline, TRUE,FALSE,'1',NULL,TRUE);
send_dtmf_cleanup(marie, pauline);

View file

@ -343,15 +343,15 @@ static void publish_test_with_args(bool_t refresh, int expires){
linphone_core_manager_destroy(pauline);
}
static void publish_test(){
static void publish_test(void){
publish_test_with_args(TRUE,5);
}
static void publish_no_auto_test(){
static void publish_no_auto_test(void){
publish_test_with_args(FALSE,5);
}
static void publish_without_expires(){
static void publish_without_expires(void){
publish_test_with_args(TRUE,-1);
}

View file

@ -341,8 +341,8 @@ int linphone_core_manager_get_mean_audio_up_bw(const LinphoneCoreManager *mgr);
void video_call_base_2(LinphoneCoreManager* pauline,LinphoneCoreManager* marie, bool_t using_policy,LinphoneMediaEncryption mode, bool_t callee_video_enabled, bool_t caller_video_enabled);
void liblinphone_tester_before_each();
void liblinphone_tester_after_each();
void liblinphone_tester_before_each(void);
void liblinphone_tester_after_each(void);
void liblinphone_tester_init(void(*ftester_printf)(int level, const char *fmt, va_list args));
void liblinphone_tester_uninit(void);

View file

@ -237,26 +237,26 @@ static time_t check_file(LinphoneCoreManager* mgr) {
return log_time;
}
static void collect_files_disabled() {
static void collect_files_disabled(void) {
LinphoneCoreManager* marie = setup(FALSE);
BC_ASSERT_PTR_NULL(linphone_core_compress_log_collection(marie->lc));
collect_cleanup(marie);
}
static void collect_files_filled() {
static void collect_files_filled(void) {
LinphoneCoreManager* marie = setup(TRUE);
check_file(marie);
collect_cleanup(marie);
}
static void collect_files_small_size() {
static void collect_files_small_size(void) {
LinphoneCoreManager* marie = setup(TRUE);
linphone_core_set_log_collection_max_file_size(5000);
check_file(marie);
collect_cleanup(marie);
}
static void collect_files_changing_size() {
static void collect_files_changing_size(void) {
LinphoneCoreManager* marie = setup(TRUE);
int waiting = 100;
@ -282,14 +282,14 @@ static void logCollectionUploadStateChangedCb(LinphoneCore *lc, LinphoneCoreLogC
break;
case LinphoneCoreLogCollectionUploadStateDelivered:
counters->number_of_LinphoneCoreLogCollectionUploadStateDelivered++;
BC_ASSERT_GREATER(strlen(info), 0, int, "%d");
BC_ASSERT_GREATER((int)strlen(info), 0, int, "%d");
break;
case LinphoneCoreLogCollectionUploadStateNotDelivered:
counters->number_of_LinphoneCoreLogCollectionUploadStateNotDelivered++;
break;
}
}
static void upload_collected_traces() {
static void upload_collected_traces(void) {
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager* marie = setup(TRUE);
int waiting = 100;

View file

@ -97,7 +97,7 @@ LinphoneBuffer * tester_file_transfer_send(LinphoneChatMessage *msg, const Linph
FILE *file_to_send = linphone_chat_message_get_user_data(msg);
fseek(file_to_send, 0, SEEK_END);
file_size = ftell(file_to_send);
fseek(file_to_send, offset, SEEK_SET);
fseek(file_to_send, (long)offset, SEEK_SET);
size_to_send = MIN(size, file_size - offset);
buf = ms_malloc(size_to_send);
if (fread(buf, size_to_send, 1, file_to_send)!=size_to_send){
@ -179,7 +179,7 @@ void compare_files(const char *path1, const char *path2) {
buf2 = (uint8_t*)ms_load_path_content(path2, &size2);
BC_ASSERT_PTR_NOT_NULL(buf1);
BC_ASSERT_PTR_NOT_NULL(buf2);
BC_ASSERT_EQUAL(size1, size2, uint8_t, "%u");
BC_ASSERT_EQUAL((uint8_t)size1, (uint8_t)size2, uint8_t, "%u");
BC_ASSERT_EQUAL(memcmp(buf1, buf2, size1), 0, int, "%d");
ms_free(buf1);
ms_free(buf2);
@ -461,7 +461,7 @@ void transfer_message_base(bool_t upload_error, bool_t download_error) {
linphone_core_manager_destroy(marie);
}
}
static void transfer_message() {
static void transfer_message(void) {
transfer_message_base(FALSE, FALSE);
}
@ -574,7 +574,7 @@ static void file_transfer_using_external_body_url(void) {
}
}
static void file_transfer_2_messages_simultaneously() {
static void file_transfer_2_messages_simultaneously(void) {
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneChatRoom* pauline_room;
@ -712,7 +712,7 @@ void info_message_base(bool_t with_content) {
if (linphone_content_get_type(content)) BC_ASSERT_STRING_EQUAL(linphone_content_get_type(content),"application");
if (linphone_content_get_subtype(content)) BC_ASSERT_STRING_EQUAL(linphone_content_get_subtype(content),"somexml");
if (linphone_content_get_buffer(content))BC_ASSERT_STRING_EQUAL((const char*)linphone_content_get_buffer(content),info_content);
BC_ASSERT_EQUAL(linphone_content_get_size(content),strlen(info_content), int, "%d");
BC_ASSERT_EQUAL((int)linphone_content_get_size(content),(int)strlen(info_content), int, "%d");
}
}
end_call(marie, pauline);
@ -720,11 +720,11 @@ void info_message_base(bool_t with_content) {
linphone_core_manager_destroy(pauline);
}
static void info_message(){
static void info_message(void){
info_message_base(FALSE);
}
static void info_message_with_body(){
static void info_message_with_body(void){
info_message_base(TRUE);
}
@ -857,11 +857,11 @@ void lime_transfer_message_base(bool_t encrypt_file) {
linphone_core_manager_destroy(pauline);
}
static void lime_transfer_message() {
static void lime_transfer_message(void) {
lime_transfer_message_base(TRUE);
}
static void lime_transfer_message_without_encryption() {
static void lime_transfer_message_without_encryption(void) {
lime_transfer_message_base(FALSE);
}
@ -1110,7 +1110,7 @@ void history_message_count_helper(LinphoneChatRoom* chatroom, int x, int y, int
ms_list_free_with_data(messages, (void (*)(void *))linphone_chat_message_unref);
}
static void database_migration() {
static void database_migration(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
char *src_db = bc_tester_res("messages.db");
char *tmp_db = bc_tester_file("tmp.db");
@ -1137,7 +1137,7 @@ static void database_migration() {
ms_free(tmp_db);
}
static void history_range(){
static void history_range(void){
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
LinphoneAddress *jehan_addr = linphone_address_new("<sip:Jehan@sip.linphone.org>");
LinphoneChatRoom *chatroom;
@ -1177,7 +1177,7 @@ static void history_range(){
ms_free(tmp_db);
}
static void history_count() {
static void history_count(void) {
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
LinphoneAddress *jehan_addr = linphone_address_new("<sip:Jehan@sip.linphone.org>");
LinphoneChatRoom *chatroom;
@ -1236,7 +1236,7 @@ static void history_count() {
}
#endif
static void text_status_after_destroying_chat_room() {
static void text_status_after_destroying_chat_room(void) {
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
LinphoneChatRoom *chatroom = linphone_core_get_chat_room_from_uri(marie->lc, "<sip:Jehan@sip.linphone.org>");
LinphoneChatMessage *msg = linphone_chat_room_create_message(chatroom, "hello");
@ -1266,19 +1266,19 @@ void file_transfer_io_error_base(char *server_url, bool_t destroy_room) {
linphone_core_manager_destroy(marie);
}
static void file_transfer_not_sent_if_invalid_url() {
static void file_transfer_not_sent_if_invalid_url(void) {
file_transfer_io_error_base("INVALID URL", FALSE);
}
static void file_transfer_not_sent_if_host_not_found() {
static void file_transfer_not_sent_if_host_not_found(void) {
file_transfer_io_error_base("https://not_existing_url.com", FALSE);
}
static void file_transfer_not_sent_if_url_moved_permanently() {
static void file_transfer_not_sent_if_url_moved_permanently(void) {
file_transfer_io_error_base("http://linphone.org/toto.php", FALSE);
}
static void file_transfer_io_error_after_destroying_chatroom() {
static void file_transfer_io_error_after_destroying_chatroom(void) {
file_transfer_io_error_base("https://www.linphone.org:444/lft.php", TRUE);
}

View file

@ -68,7 +68,7 @@ static void call_multicast_base(bool_t video) {
static void call_multicast(void) {
call_multicast_base(FALSE);
}
static void multicast_audio_with_pause_resume() {
static void multicast_audio_with_pause_resume(void) {
call_paused_resumed_base(TRUE);
}
#ifdef VIDEO_ENABLED
@ -223,14 +223,14 @@ static void early_media_with_multicast_base(bool_t video) {
linphone_core_manager_destroy(pauline2);
}
static void early_media_with_multicast_audio() {
static void early_media_with_multicast_audio(void) {
early_media_with_multicast_base(FALSE);
}
static void unicast_incoming_with_multicast_audio_on() {
static void unicast_incoming_with_multicast_audio_on(void) {
simple_call_base(TRUE);
}
#ifdef VIDEO_ENABLED
static void early_media_with_multicast_video() {
static void early_media_with_multicast_video(void) {
early_media_with_multicast_base(TRUE);
}
#endif

View file

@ -191,7 +191,7 @@ end:
}
static void profile_call(bool_t avpf1, LinphoneMediaEncryption srtp1, bool_t avpf2, LinphoneMediaEncryption srtp2, const char *expected_profile) {
return profile_call_base(avpf1, srtp1, avpf2,srtp2,FALSE,expected_profile);
profile_call_base(avpf1, srtp1, avpf2,srtp2,FALSE,expected_profile);
}
static void avp_to_avp_call(void) {
profile_call(FALSE, LinphoneMediaEncryptionNone, FALSE, LinphoneMediaEncryptionNone, "RTP/AVP");

View file

@ -64,7 +64,7 @@ static void play_file(const char *filename, bool_t supported_format, const char
BC_ASSERT_EQUAL(res, 0, int, "%d");
if(res == -1) goto fail;
BC_ASSERT_TRUE(wait_for_eof(&eof, &time, 100, linphone_player_get_duration(player) * 1.05));
BC_ASSERT_TRUE(wait_for_eof(&eof, &time, 100, (int)(linphone_player_get_duration(player) * 1.05)));
linphone_player_close(player);

View file

@ -141,11 +141,11 @@ static void simple_publish_with_expire(int expires) {
linphone_core_manager_destroy(marie);
}
static void simple_publish() {
static void simple_publish(void) {
simple_publish_with_expire(-1);
}
static void publish_with_expires() {
static void publish_with_expires(void) {
simple_publish_with_expire(1);
}
@ -341,7 +341,7 @@ static void presence_information(void) {
wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphonePresenceActivityShopping,1);
BC_ASSERT_EQUAL(marie->stat.number_of_LinphonePresenceActivityShopping, 1, int, "%d");
presence_timestamp = linphone_presence_model_get_timestamp(presence);
BC_ASSERT_GREATER(presence_timestamp , current_timestamp, unsigned, "%u");
BC_ASSERT_GREATER((unsigned)presence_timestamp , (unsigned)current_timestamp, unsigned, "%u");
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);

View file

@ -32,7 +32,7 @@ const char* phone_normalization(LinphoneProxyConfig *proxy, const char* in) {
}
}
static void phone_normalization_without_proxy() {
static void phone_normalization_without_proxy(void) {
BC_ASSERT_STRING_EQUAL(phone_normalization(NULL, "012 345 6789"), "0123456789");
BC_ASSERT_STRING_EQUAL(phone_normalization(NULL, "+33123456789"), "+33123456789");
BC_ASSERT_STRING_EQUAL(phone_normalization(NULL, "+33012345678"), "+33012345678");
@ -43,7 +43,7 @@ static void phone_normalization_without_proxy() {
BC_ASSERT_PTR_NULL(phone_normalization(NULL, "I_AM_NOT_A_NUMBER")); // invalid phone number
}
static void phone_normalization_with_proxy() {
static void phone_normalization_with_proxy(void) {
LinphoneProxyConfig *proxy = linphone_proxy_config_new();
linphone_proxy_config_set_dial_prefix(proxy, "33");
BC_ASSERT_STRING_EQUAL(phone_normalization(proxy, "012 3456 789"), "+33123456789");

View file

@ -141,7 +141,7 @@ bool_t create_call_for_quality_reporting_tests(
return call_succeeded;
}
static void quality_reporting_not_used_without_config() {
static void quality_reporting_not_used_without_config(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_quality_reporting_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCall* call_marie = NULL;
@ -164,7 +164,7 @@ static void quality_reporting_not_used_without_config() {
linphone_core_manager_destroy(pauline);
}
static void quality_reporting_not_sent_if_call_not_started() {
static void quality_reporting_not_sent_if_call_not_started(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_quality_reporting_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCallLog* out_call_log;
@ -197,7 +197,7 @@ end:
linphone_core_manager_destroy(pauline);
}
static void quality_reporting_not_sent_if_low_bandwidth() {
static void quality_reporting_not_sent_if_low_bandwidth(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_quality_reporting_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCallParams* marie_params;
@ -222,7 +222,7 @@ void on_report_send_remove_fields(const LinphoneCall *call, SalStreamType stream
strncpy(body, "corrupted report is corrupted", strlen("corrupted report is corrupted"));
}
static void quality_reporting_invalid_report() {
static void quality_reporting_invalid_report(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_quality_reporting_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCall* call_marie = NULL;
@ -242,7 +242,7 @@ static void quality_reporting_invalid_report() {
linphone_core_manager_destroy(pauline);
}
static void quality_reporting_at_call_termination() {
static void quality_reporting_at_call_termination(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_quality_reporting_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_rtcp_xr");
LinphoneCall* call_marie = NULL;
@ -271,7 +271,7 @@ static void quality_reporting_at_call_termination() {
linphone_core_manager_destroy(pauline);
}
static void quality_reporting_interval_report() {
static void quality_reporting_interval_report(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc_rtcp_xr");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc_rtcp_xr");
LinphoneCall* call_marie = NULL;
@ -293,7 +293,7 @@ static void quality_reporting_interval_report() {
linphone_core_manager_destroy(pauline);
}
static void quality_reporting_session_report_if_video_stopped() {
static void quality_reporting_session_report_if_video_stopped(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc_rtcp_xr");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCall* call_pauline = NULL;
@ -346,7 +346,7 @@ void publish_report_with_route_state_changed(LinphoneCore *lc, LinphoneEvent *ev
}
}
static void quality_reporting_sent_using_custom_route() {
static void quality_reporting_sent_using_custom_route(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_quality_reporting_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCall* call_marie = NULL;

View file

@ -159,7 +159,7 @@ static void register_with_refresh(LinphoneCoreManager* lcm, bool_t refresh,const
BC_ASSERT_EQUAL(counters->number_of_LinphoneRegistrationCleared,1, int, "%d");
}
static void register_with_refresh_with_send_error() {
static void register_with_refresh_with_send_error(void) {
int retry=0;
LinphoneCoreManager* lcm = create_lcm_with_auth(1);
stats* counters = &lcm->stat;
@ -183,7 +183,7 @@ static void register_with_refresh_with_send_error() {
linphone_core_manager_destroy(lcm);
}
static void simple_register(){
static void simple_register(void){
LinphoneCoreManager* lcm = create_lcm();
stats* counters = &lcm->stat;
register_with_refresh(lcm,FALSE,NULL,NULL);
@ -210,7 +210,7 @@ static void register_with_custom_headers(void){
linphone_core_manager_destroy(marie);
}
static void simple_unregister(){
static void simple_unregister(void){
LinphoneCoreManager* lcm = create_lcm();
stats* counters = &lcm->stat;
LinphoneProxyConfig* proxy_config;
@ -229,7 +229,7 @@ static void simple_unregister(){
linphone_core_manager_destroy(lcm);
}
static void change_expires(){
static void change_expires(void){
LinphoneCoreManager* lcm = create_lcm();
stats* counters = &lcm->stat;
LinphoneProxyConfig* proxy_config;
@ -257,7 +257,7 @@ static void change_expires(){
}
/*take care of min expires configuration from server*/
static void simple_register_with_refresh() {
static void simple_register_with_refresh(void) {
LinphoneCoreManager* lcm = create_lcm();
stats* counters = &lcm->stat;
register_with_refresh(lcm,TRUE,NULL,NULL);
@ -265,7 +265,7 @@ static void simple_register_with_refresh() {
linphone_core_manager_destroy(lcm);
}
static void simple_auth_register_with_refresh() {
static void simple_auth_register_with_refresh(void) {
LinphoneCoreManager* lcm = create_lcm_with_auth(1);
stats* counters = &lcm->stat;
char route[256];
@ -275,7 +275,7 @@ static void simple_auth_register_with_refresh() {
linphone_core_manager_destroy(lcm);
}
static void simple_tcp_register(){
static void simple_tcp_register(void){
char route[256];
LinphoneCoreManager* lcm;
sprintf(route,"sip:%s;transport=tcp",test_route);
@ -284,7 +284,7 @@ static void simple_tcp_register(){
linphone_core_manager_destroy(lcm);
}
static void simple_tcp_register_compatibility_mode(){
static void simple_tcp_register_compatibility_mode(void){
char route[256];
LinphoneCoreManager* lcm;
LCSipTransports transport = {0,5070,0,0};
@ -294,7 +294,7 @@ static void simple_tcp_register_compatibility_mode(){
linphone_core_manager_destroy(lcm);
}
static void simple_tls_register(){
static void simple_tls_register(void){
if (transport_supported(LinphoneTransportTls)) {
char route[256];
LinphoneCoreManager* lcm = create_lcm();
@ -305,7 +305,7 @@ static void simple_tls_register(){
}
static void simple_authenticated_register(){
static void simple_authenticated_register(void){
stats* counters;
LinphoneCoreManager* lcm = create_lcm();
LinphoneAuthInfo *info=linphone_auth_info_new(test_username,NULL,test_password,NULL,auth_domain,NULL); /*create authentication structure from identity*/
@ -318,7 +318,7 @@ static void simple_authenticated_register(){
linphone_core_manager_destroy(lcm);
}
static void ha1_authenticated_register(){
static void ha1_authenticated_register(void){
stats* counters;
LinphoneCoreManager* lcm = create_lcm();
char ha1[33];
@ -334,7 +334,7 @@ static void ha1_authenticated_register(){
linphone_core_manager_destroy(lcm);
}
static void authenticated_register_with_no_initial_credentials(){
static void authenticated_register_with_no_initial_credentials(void){
LinphoneCoreManager *lcm;
LinphoneCoreVTable* vtable = linphone_core_v_table_new();
stats* counters;
@ -355,7 +355,7 @@ static void authenticated_register_with_no_initial_credentials(){
}
static void authenticated_register_with_late_credentials(){
static void authenticated_register_with_late_credentials(void){
LinphoneCoreManager *lcm;
stats* counters;
char route[256];
@ -371,7 +371,7 @@ static void authenticated_register_with_late_credentials(){
linphone_core_manager_destroy(lcm);
}
static void authenticated_register_with_provided_credentials(){
static void authenticated_register_with_provided_credentials(void){
LinphoneCoreManager *lcm;
stats* counters;
LinphoneProxyConfig *cfg;
@ -412,7 +412,7 @@ static void authenticated_register_with_provided_credentials(){
linphone_core_manager_destroy(lcm);
}
static void authenticated_register_with_wrong_late_credentials(){
static void authenticated_register_with_wrong_late_credentials(void){
LinphoneCoreManager *lcm;
stats* counters;
LCSipTransports transport = {5070,5070,0,5071};
@ -477,10 +477,10 @@ static void authenticated_register_with_wrong_credentials_with_params(const char
authenticated_register_with_wrong_credentials_with_params_base(user_agent,lcm);
linphone_core_manager_destroy(lcm);
}
static void authenticated_register_with_wrong_credentials() {
static void authenticated_register_with_wrong_credentials(void) {
authenticated_register_with_wrong_credentials_with_params(NULL);
}
static void authenticated_register_with_wrong_credentials_2() {
static void authenticated_register_with_wrong_credentials_2(void) {
LinphoneCoreManager *lcm = linphone_core_manager_new(NULL);
stats* counters = get_stats(lcm->lc);
int current_in_progress;
@ -498,7 +498,7 @@ static void authenticated_register_with_wrong_credentials_2() {
linphone_core_manager_destroy(lcm);
}
static void authenticated_register_with_wrong_credentials_without_403() {
static void authenticated_register_with_wrong_credentials_without_403(void) {
authenticated_register_with_wrong_credentials_with_params("tester-no-403");
}
static LinphoneCoreManager* configure_lcm(void) {
@ -512,14 +512,14 @@ static LinphoneCoreManager* configure_lcm(void) {
return NULL;
}
static void multiple_proxy(){
static void multiple_proxy(void){
LinphoneCoreManager *lcm=configure_lcm();
if (lcm) {
linphone_core_manager_destroy(lcm);
}
}
static void network_state_change(){
static void network_state_change(void){
int register_ok;
stats *counters;
LinphoneCoreManager *lcm=configure_lcm();
@ -549,7 +549,7 @@ static int get_number_of_udp_proxy(const LinphoneCore* lc) {
}
return number_of_udp_proxy;
}
static void transport_change(){
static void transport_change(void){
LinphoneCoreManager *lcm;
LinphoneCore* lc;
int register_ok;
@ -582,7 +582,7 @@ static void transport_change(){
}
}
static void proxy_transport_change(){
static void proxy_transport_change(void){
LinphoneCoreManager* lcm = create_lcm();
stats* counters = &lcm->stat;
LinphoneProxyConfig* proxy_config;
@ -617,7 +617,7 @@ static void proxy_transport_change(){
linphone_core_manager_destroy(lcm);
}
static void proxy_transport_change_with_wrong_port() {
static void proxy_transport_change_with_wrong_port(void) {
LinphoneCoreManager* lcm = create_lcm();
stats* counters = &lcm->stat;
LinphoneProxyConfig* proxy_config;
@ -648,7 +648,7 @@ static void proxy_transport_change_with_wrong_port() {
}
static void proxy_transport_change_with_wrong_port_givin_up() {
static void proxy_transport_change_with_wrong_port_givin_up(void) {
LinphoneCoreManager* lcm = create_lcm();
stats* counters = &lcm->stat;
LinphoneProxyConfig* proxy_config;
@ -677,7 +677,7 @@ static void proxy_transport_change_with_wrong_port_givin_up() {
}
static void io_recv_error(){
static void io_recv_error(void){
LinphoneCoreManager *lcm;
LinphoneCore* lc;
int register_ok;
@ -702,7 +702,7 @@ static void io_recv_error(){
}
}
static void io_recv_error_retry_immediatly(){
static void io_recv_error_retry_immediatly(void){
LinphoneCoreManager *lcm;
LinphoneCore* lc;
int register_ok;
@ -727,7 +727,7 @@ static void io_recv_error_retry_immediatly(){
}
}
static void io_recv_error_late_recovery(){
static void io_recv_error_late_recovery(void){
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager *lcm;
LinphoneCore* lc;
@ -762,7 +762,7 @@ static void io_recv_error_late_recovery(){
}
}
static void io_recv_error_without_active_register(){
static void io_recv_error_without_active_register(void){
LinphoneCoreManager *lcm;
LinphoneCore* lc;
int register_ok;
@ -802,7 +802,7 @@ static void io_recv_error_without_active_register(){
}
static void tls_certificate_failure(){
static void tls_certificate_failure(void){
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager* lcm;
LinphoneCore *lc;
@ -828,7 +828,7 @@ static void tls_certificate_failure(){
}
/*the purpose of this test is to check that will not block the proxy config during SSL handshake for entire life in case of mistaken configuration*/
static void tls_with_non_tls_server(){
static void tls_with_non_tls_server(void){
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager *lcm;
LinphoneProxyConfig* proxy_cfg;
@ -852,7 +852,7 @@ static void tls_with_non_tls_server(){
}
}
static void tls_alt_name_register(){
static void tls_alt_name_register(void){
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager* lcm;
LinphoneCore *lc;
@ -869,7 +869,7 @@ static void tls_alt_name_register(){
}
}
static void tls_wildcard_register(){
static void tls_wildcard_register(void){
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager* lcm;
LinphoneCore *lc;
@ -886,7 +886,7 @@ static void tls_wildcard_register(){
}
}
static void redirect(){
static void redirect(void){
char route[256];
LinphoneCoreManager* lcm;
LCSipTransports transport = {-1,0,0,0};

View file

@ -71,7 +71,7 @@ static void core_sip_transport_test(void) {
linphone_core_destroy(lc);
}
static void linphone_interpret_url_test()
static void linphone_interpret_url_test(void)
{
LinphoneCoreVTable v_table;
LinphoneCore* lc;
@ -94,7 +94,7 @@ static void linphone_interpret_url_test()
linphone_core_destroy ( lc );
}
static void linphone_lpconfig_from_buffer(){
static void linphone_lpconfig_from_buffer(void){
const char* buffer = "[buffer]\ntest=ok";
const char* buffer_linebreaks = "[buffer_linebreaks]\n\n\n\r\n\n\r\ntest=ok";
LpConfig* conf;
@ -108,7 +108,7 @@ static void linphone_lpconfig_from_buffer(){
lp_config_destroy(conf);
}
static void linphone_lpconfig_from_buffer_zerolen_value(){
static void linphone_lpconfig_from_buffer_zerolen_value(void){
/* parameters that have no value should return NULL, not "". */
const char* zerolen = "[test]\nzero_len=\nnon_zero_len=test";
LpConfig* conf;
@ -124,7 +124,7 @@ static void linphone_lpconfig_from_buffer_zerolen_value(){
lp_config_destroy(conf);
}
static void linphone_lpconfig_from_file_zerolen_value(){
static void linphone_lpconfig_from_file_zerolen_value(void){
/* parameters that have no value should return NULL, not "". */
const char* zero_rc_file = "zero_length_params_rc";
char* rc_path = ms_strdup_printf("%s/rcfiles/%s", bc_tester_get_resource_dir_prefix(), zero_rc_file);
@ -146,7 +146,7 @@ static void linphone_lpconfig_from_file_zerolen_value(){
lp_config_destroy(conf);
}
static void linphone_lpconfig_from_xml_zerolen_value(){
static void linphone_lpconfig_from_xml_zerolen_value(void){
const char* zero_xml_file = "remote_zero_length_params_rc";
char* xml_path = ms_strdup_printf("%s/rcfiles/%s", bc_tester_get_resource_dir_prefix(), zero_xml_file);
LpConfig* conf;
@ -167,7 +167,7 @@ static void linphone_lpconfig_from_xml_zerolen_value(){
ms_free(xml_path);
}
void linphone_proxy_config_address_equal_test() {
void linphone_proxy_config_address_equal_test(void) {
LinphoneAddress *a = linphone_address_new("sip:toto@titi");
LinphoneAddress *b = linphone_address_new("sips:toto@titi");
LinphoneAddress *c = linphone_address_new("sip:toto@titi;transport=tcp");
@ -193,7 +193,7 @@ void linphone_proxy_config_address_equal_test() {
linphone_address_destroy(f);
}
void linphone_proxy_config_is_server_config_changed_test() {
void linphone_proxy_config_is_server_config_changed_test(void) {
LinphoneProxyConfig* proxy_config = linphone_proxy_config_new();
linphone_proxy_config_done(proxy_config); /*test done without edit*/

View file

@ -36,7 +36,7 @@ static int test_stun_encode( char*buffer, size_t len, bool_t expect_fail )
memset(&username,0,sizeof(username));
memset(&password,0,sizeof(password));
stunBuildReqSimple( &req, &username, TRUE , TRUE , 11);
len = stunEncodeMessage( &req, buffer, len, &password);
len = stunEncodeMessage( &req, buffer, (unsigned int)len, &password);
if (len<=0){
if( expect_fail )
ms_message("Fail to encode stun message (EXPECTED).\n");
@ -44,11 +44,11 @@ static int test_stun_encode( char*buffer, size_t len, bool_t expect_fail )
ms_error("Fail to encode stun message.\n");
return -1;
}
return len;
return (int)len;
}
static void linphone_stun_test_encode()
static void linphone_stun_test_encode(void)
{
char smallBuff[12];
size_t smallLen = 12;
@ -64,7 +64,7 @@ static void linphone_stun_test_encode()
}
static void linphone_stun_test_grab_ip()
static void linphone_stun_test_grab_ip(void)
{
LinphoneCoreManager* lc_stun = linphone_core_manager_new2( "stun_rc", FALSE);
LinphoneCall dummy_call;

View file

@ -404,7 +404,7 @@ int liblinphone_tester_ipv6_available(void){
socklen_t slen=sizeof(ss);
char localip[128];
int port=0;
belle_sip_get_src_addr_for(ai->ai_addr,ai->ai_addrlen,(struct sockaddr*) &ss,&slen,4444);
belle_sip_get_src_addr_for(ai->ai_addr,(socklen_t)ai->ai_addrlen,(struct sockaddr*) &ss,&slen,4444);
src.ai_addr=(struct sockaddr*) &ss;
src.ai_addrlen=slen;
belle_sip_addrinfo_to_ip(&src,localip, sizeof(localip),&port);
@ -494,14 +494,14 @@ int linphone_core_manager_get_mean_audio_up_bw(const LinphoneCoreManager *mgr) {
, sizeof(mgr->stat.audio_upload_bandwidth)/sizeof(int));
}
void liblinphone_tester_before_each() {
void liblinphone_tester_before_each(void) {
if (!liblinphone_tester_leak_detector_disabled){
belle_sip_object_enable_leak_detector(TRUE);
leaked_objects_count = belle_sip_object_get_object_count();
}
}
void liblinphone_tester_after_each() {
void liblinphone_tester_after_each(void) {
if (!liblinphone_tester_leak_detector_disabled){
int leaked_objects = belle_sip_object_get_object_count() - leaked_objects_count;
// this will NOT be counted in tests fail but at least it will be shown

View file

@ -48,7 +48,7 @@ static void upnp_check_ipaddress(void) {
addr = linphone_core_get_upnp_external_ipaddress(lc_upnp->lc);
BC_ASSERT_PTR_NOT_NULL(addr);
if (addr!=NULL) {
BC_ASSERT_GREATER(strlen(addr),7,int,"%d");
BC_ASSERT_GREATER((int)strlen(addr),7,int,"%d");
}
linphone_core_manager_destroy(lc_upnp);
}

View file

@ -503,7 +503,7 @@ static void forked_outgoing_early_media_video_call_with_inactive_audio_test(void
}
#endif /*HAVE_GTK*/
static void enable_disable_camera_after_camera_switches() {
static void enable_disable_camera_after_camera_switches(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
const char *currentCamId = (char*)linphone_core_get_video_device(marie->lc);