Commit cd2de42f authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

Fix some clang warnings on Debian

parent f07b7be0
......@@ -386,7 +386,7 @@ static void update_ip(LinphoneCall * call, int stats_type) {
if (local_desc != NULL) {
/*since this function might be called for video stream AFTER it has been uninitialized, local description might
be invalid. In any other case, IP/port should be always filled and valid*/
if (local_desc->rtp_addr != NULL && strlen(local_desc->rtp_addr) > 0) {
if (strlen(local_desc->rtp_addr) > 0) {
call->log->reporting.reports[stats_type]->info.local_addr.port = local_desc->rtp_port;
STR_REASSIGN(call->log->reporting.reports[stats_type]->info.local_addr.ip, ms_strdup(local_desc->rtp_addr));
}
......@@ -397,7 +397,7 @@ static void update_ip(LinphoneCall * call, int stats_type) {
call->log->reporting.reports[stats_type]->info.remote_addr.port = remote_desc->rtp_port;
/*for IP it can be not set if we are using a direct route*/
if (remote_desc->rtp_addr != NULL && strlen(remote_desc->rtp_addr) > 0) {
if (strlen(remote_desc->rtp_addr) > 0) {
STR_REASSIGN(call->log->reporting.reports[stats_type]->info.remote_addr.ip, ms_strdup(remote_desc->rtp_addr));
} else {
STR_REASSIGN(call->log->reporting.reports[stats_type]->info.remote_addr.ip, ms_strdup(sal_call_get_remote_media_description(call->op)->addr));
......
mediastreamer2 @ 30246c54
Subproject commit f74295ef1a01ec50fa46aac5ab891527a33d8eb6
Subproject commit 30246c54f458c8bc2b93851b5c2e7aa7f16da8ce
......@@ -145,7 +145,7 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana
if (!c1 || !c2) return;
linphone_call_ref(c1);
linphone_call_ref(c2);
liblinphone_tester_clock_start(&ts);
do {
if (linphone_call_get_audio_stats(c1)->round_trip_delay >0.0
......@@ -1343,14 +1343,14 @@ static void call_with_declined_video_base(bool_t using_policy) {
caller_params=linphone_core_create_default_call_parameters(pauline->lc);
if (!using_policy)
linphone_call_params_enable_video(caller_params,TRUE);
if (!using_policy){
callee_params=linphone_core_create_default_call_parameters(marie->lc);
linphone_call_params_enable_video(callee_params,FALSE);
}
CU_ASSERT_TRUE(call_with_params2(pauline,marie,caller_params,callee_params,using_policy));
linphone_call_params_destroy(caller_params);
if (callee_params) linphone_call_params_destroy(callee_params);
marie_call=linphone_core_get_current_call(marie->lc);
......@@ -1398,7 +1398,7 @@ static void video_call_base(LinphoneCoreManager* pauline,LinphoneCoreManager* ma
caller_params=linphone_core_create_default_call_parameters(pauline->lc);
if (!using_policy)
linphone_call_params_enable_video(caller_params,TRUE);
if (!using_policy){
callee_params=linphone_core_create_default_call_parameters(marie->lc);
linphone_call_params_enable_video(callee_params,TRUE);
......@@ -1902,21 +1902,21 @@ static void call_with_file_player(void) {
char hellopath[256];
char *recordpath = create_filepath(liblinphone_tester_writable_dir_prefix, "record", "wav");
double similar;
/*make sure the record file doesn't already exists, otherwise this test will append new samples to it*/
unlink(recordpath);
snprintf(hellopath,sizeof(hellopath), "%s/sounds/hello8000.wav", liblinphone_tester_file_prefix);
/*caller uses files instead of soundcard in order to avoid mixing soundcard input with file played using call's player*/
linphone_core_use_files(pauline->lc,TRUE);
linphone_core_set_play_file(pauline->lc,NULL);
/*callee is recording and plays file*/
linphone_core_use_files(pauline->lc,TRUE);
linphone_core_set_play_file(pauline->lc,hellopath);
linphone_core_set_record_file(pauline->lc,recordpath);
CU_ASSERT_TRUE(call(marie,pauline));
player=linphone_call_get_player(linphone_core_get_current_call(marie->lc));
......@@ -1926,7 +1926,7 @@ static void call_with_file_player(void) {
CU_ASSERT_TRUE(linphone_player_start(player)==0);
}
CU_ASSERT_TRUE(wait_for_until(pauline->lc,marie->lc,&marie->stat.number_of_player_eof,1,12000));
/*just to sleep*/
linphone_core_terminate_all_calls(marie->lc);
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1));
......@@ -1965,10 +1965,10 @@ static void call_with_mkv_file_player(void) {
recordpath = create_filepath(liblinphone_tester_writable_dir_prefix, "record", "wav");
/*make sure the record file doesn't already exists, otherwise this test will append new samples to it*/
unlink(recordpath);
snprintf(hellowav,sizeof(hellowav), "%s/sounds/hello8000.wav", liblinphone_tester_file_prefix);
snprintf(hellomkv,sizeof(hellomkv), "%s/sounds/hello8000.mkv", liblinphone_tester_file_prefix);
/*caller uses files instead of soundcard in order to avoid mixing soundcard input with file played using call's player*/
linphone_core_use_files(marie->lc,TRUE);
linphone_core_set_play_file(marie->lc,NULL);
......@@ -1976,7 +1976,7 @@ static void call_with_mkv_file_player(void) {
linphone_core_use_files(pauline->lc,TRUE);
linphone_core_set_play_file(pauline->lc,hellowav); /*just to send something but we are not testing what is sent by pauline*/
linphone_core_set_record_file(pauline->lc,recordpath);
CU_ASSERT_TRUE(call(marie,pauline));
player=linphone_call_get_player(linphone_core_get_current_call(marie->lc));
......@@ -1987,7 +1987,7 @@ static void call_with_mkv_file_player(void) {
CU_ASSERT_TRUE(wait_for_until(pauline->lc,marie->lc,&marie->stat.number_of_player_eof,1,12000));
linphone_player_close(player);
}
/*just to sleep*/
linphone_core_terminate_all_calls(marie->lc);
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1));
......@@ -1996,11 +1996,11 @@ static void call_with_mkv_file_player(void) {
CU_ASSERT_TRUE(similar>0.6);
CU_ASSERT_TRUE(similar<=1.0);
ms_free(recordpath);
end:
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
}
......@@ -2182,7 +2182,7 @@ static void early_media_call_with_ringing(void){
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallEnd,1,1000));
CU_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneCallEnd,1,1000));
ended_time=time(NULL);
CU_ASSERT_TRUE (abs (linphone_call_log_get_duration(marie_call_log) - (ended_time - connected_time)) <1 );
CU_ASSERT_TRUE (labs (linphone_call_log_get_duration(marie_call_log) - (ended_time - connected_time)) <1 );
ms_list_free(lcs);
}
......@@ -3138,7 +3138,7 @@ static void call_with_custom_supported_tags(void) {
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new( "pauline_rc");
linphone_core_add_supported_tag(marie->lc,"pouet-tag");
CU_ASSERT_TRUE(call(pauline,marie));
liblinphone_tester_check_rtcp(marie,pauline);
......@@ -3167,7 +3167,7 @@ static void call_log_from_taken_from_p_asserted_id(void) {
const char* paulie_asserted_id ="\"Paupauche\" <sip:pauline@super.net>";
LinphoneAddress *paulie_asserted_id_addr = linphone_address_new(paulie_asserted_id);
LpConfig *marie_lp;
params=linphone_core_create_default_call_parameters(pauline->lc);
linphone_call_params_add_custom_header(params,"P-Asserted-Identity",paulie_asserted_id);
......
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