From cafb1dfa3e8a1b92826214322be7adecf82b1d76 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 20 Nov 2015 17:56:11 +0100 Subject: [PATCH] Fix strict-prototypes warnings. --- console/commands.c | 4 ++-- console/linphonec.c | 4 ++-- console/linphonec.h | 4 ++-- coreapi/bellesip_sal/sal_impl.c | 2 +- coreapi/ldap/ldapprovider.h | 2 +- coreapi/lime.h | 2 +- coreapi/linphonecore.c | 4 ++-- coreapi/linphonecore.h | 6 +++--- coreapi/private.h | 8 ++++---- coreapi/quality_reporting.h | 2 +- gtk/audio_assistant.c | 14 +++++++------- gtk/calllogs.c | 2 +- gtk/chat.c | 2 +- gtk/friendlist.c | 3 +-- gtk/incall_view.c | 2 +- gtk/linphone.h | 22 ++++++++++++++++------ gtk/logging.c | 6 +++--- gtk/main.c | 20 ++++++++++---------- gtk/propertybox.c | 2 +- gtk/status_icon.h | 10 ++++++++++ gtk/update.c | 2 +- gtk/utils.c | 2 +- include/sal/sal.h | 10 +++++----- mediastreamer2 | 2 +- oRTP | 2 +- tester/call_tester.c | 4 ++-- tester/common/bc_tester_utils.c | 13 +++++++++++-- tester/common/bc_tester_utils.h | 4 ++-- tester/complex_sip_call_tester.c | 10 +++++----- tester/liblinphone_tester.c | 11 +++++++++++ tester/liblinphone_tester.h | 2 +- tester/log_collection_tester.c | 14 +++++++------- tester/presence_tester.c | 4 ++-- tester/register_tester.c | 2 +- tester/tester.c | 15 +++++++++++++-- tester/video_tester.c | 9 +++++++++ 36 files changed, 143 insertions(+), 84 deletions(-) diff --git a/console/commands.c b/console/commands.c index f6cb97e56..f2c316325 100644 --- a/console/commands.c +++ b/console/commands.c @@ -638,11 +638,11 @@ lpc_cmd_chat(LinphoneCore *lc, char *args) return 1; } -const char *linphonec_get_callee(){ +const char *linphonec_get_callee(void){ return callee_name; } -const char *linphonec_get_caller(){ +const char *linphonec_get_caller(void){ return caller_name; } diff --git a/console/linphonec.c b/console/linphonec.c index ef0f87e2b..709940269 100644 --- a/console/linphonec.c +++ b/console/linphonec.c @@ -593,7 +593,7 @@ void linphonec_set_autoanswer(bool_t enabled){ auto_answer=enabled; } -bool_t linphonec_get_autoanswer(){ +bool_t linphonec_get_autoanswer(void){ return auto_answer; } @@ -965,7 +965,7 @@ static void x11_apply_video_params(VideoParams *params, Window window){ #endif -static void lpc_apply_video_params(){ +static void lpc_apply_video_params(void){ static void *old_wid=NULL; static void *old_pwid=NULL; void *wid=linphone_core_get_native_video_window_id(linphonec); diff --git a/console/linphonec.h b/console/linphonec.h index 23c0ee5a0..975fcee90 100644 --- a/console/linphonec.h +++ b/console/linphonec.h @@ -116,11 +116,11 @@ extern VideoParams lpc_preview_params; extern int linphonec_parse_command_line(LinphoneCore *lc, char *cl); extern char *linphonec_command_generator(const char *text, int state); -void linphonec_main_loop_exit(); +void linphonec_main_loop_exit(void); extern void linphonec_finish(int exit_status); extern char *linphonec_readline(char *prompt); void linphonec_set_autoanswer(bool_t enabled); -bool_t linphonec_get_autoanswer(); +bool_t linphonec_get_autoanswer(void); void linphonec_command_finished(void); void linphonec_set_caller(const char *caller); LinphoneCall *linphonec_get_call(long id); diff --git a/coreapi/bellesip_sal/sal_impl.c b/coreapi/bellesip_sal/sal_impl.c index 90295e38d..c98dbec7f 100644 --- a/coreapi/bellesip_sal/sal_impl.c +++ b/coreapi/bellesip_sal/sal_impl.c @@ -510,7 +510,7 @@ void *sal_get_user_pointer(const Sal *sal){ return sal->up; } -static void unimplemented_stub(){ +static void unimplemented_stub(void){ ms_warning("Unimplemented SAL callback"); } diff --git a/coreapi/ldap/ldapprovider.h b/coreapi/ldap/ldapprovider.h index 066ab7ba8..d45721e7b 100644 --- a/coreapi/ldap/ldapprovider.h +++ b/coreapi/ldap/ldapprovider.h @@ -38,4 +38,4 @@ LINPHONE_PUBLIC unsigned int linphone_ldap_contact_provider_get_ LINPHONE_PUBLIC LinphoneLDAPContactProvider* linphone_ldap_contact_provider_ref( void* obj ); void linphone_ldap_contact_provider_unref( void* obj ); LinphoneLDAPContactProvider* linphone_ldap_contact_provider_cast( void* obj ); -LINPHONE_PUBLIC int linphone_ldap_contact_provider_available(); +LINPHONE_PUBLIC int linphone_ldap_contact_provider_available(void); diff --git a/coreapi/lime.h b/coreapi/lime.h index c196a6410..a5da93e34 100644 --- a/coreapi/lime.h +++ b/coreapi/lime.h @@ -182,5 +182,5 @@ LINPHONE_PUBLIC char *lime_error_code_to_string(int errorCode); * * @return TRUE if Lime is available, FALSE if not */ -LINPHONE_PUBLIC bool_t lime_is_available(); +LINPHONE_PUBLIC bool_t lime_is_available(void); #endif /* LIME_H */ diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index b2b3e552f..5cd5c6322 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -687,7 +687,7 @@ void linphone_core_upload_log_collection(LinphoneCore *core) { } } -char * linphone_core_compress_log_collection() { +char * linphone_core_compress_log_collection(void) { char *filename = NULL; if (liblinphone_log_collection_state == LinphoneLogCollectionDisabled) return NULL; filename = ms_strdup_printf("%s_log.%s", @@ -704,7 +704,7 @@ char * linphone_core_compress_log_collection() { COMPRESSED_LOG_COLLECTION_EXTENSION); } -void linphone_core_reset_log_collection() { +void linphone_core_reset_log_collection(void) { char *filename; ortp_mutex_lock(&liblinphone_log_collection_mutex); clean_log_collection_upload_context(NULL); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 4492c2ff4..60a4bf54f 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -2089,7 +2089,7 @@ typedef struct _LinphoneCoreVTable{ * Instantiate a vtable with all arguments set to NULL * @return newly allocated vtable */ -LINPHONE_PUBLIC LinphoneCoreVTable *linphone_core_v_table_new(); +LINPHONE_PUBLIC LinphoneCoreVTable *linphone_core_v_table_new(void); /** * Sets a user data pointer in the vtable. @@ -2238,13 +2238,13 @@ LINPHONE_PUBLIC void linphone_core_upload_log_collection(LinphoneCore *core); * @ingroup misc * @return The path of the compressed log collection file (to be freed calling ms_free()). */ -LINPHONE_PUBLIC char * linphone_core_compress_log_collection(); +LINPHONE_PUBLIC char * linphone_core_compress_log_collection(void); /** * Reset the log collection by removing the log files. * @ingroup misc */ -LINPHONE_PUBLIC void linphone_core_reset_log_collection(); +LINPHONE_PUBLIC void linphone_core_reset_log_collection(void); /** * Define a log handler. diff --git a/coreapi/private.h b/coreapi/private.h index 51b6642a7..84d26357e 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -388,7 +388,7 @@ void linphone_core_update_friends_subscriptions(LinphoneCore *lc, LinphoneProxyC int parse_hostname_to_addr(const char *server, struct sockaddr_storage *ss, socklen_t *socklen, int default_port); -bool_t host_has_ipv6_network(); +bool_t host_has_ipv6_network(void); bool_t lp_spawn_command_line_sync(const char *command, char **result,int *command_ret); static MS2_INLINE int get_min_bandwidth(int dbw, int ubw){ @@ -966,7 +966,7 @@ void linphone_core_update_streams(LinphoneCore *lc, LinphoneCall *call, SalMedia bool_t linphone_core_is_payload_type_usable_for_bandwidth(LinphoneCore *lc, const PayloadType *pt, int bandwidth_limit); #define linphone_core_ready(lc) ((lc)->state==LinphoneGlobalOn || (lc)->state==LinphoneGlobalShutdown) -void _linphone_core_configure_resolver(); +void _linphone_core_configure_resolver(void); struct _EcCalibrator{ ms_thread_t thread; @@ -1041,7 +1041,7 @@ int _linphone_sqlite3_open(const char *db_file, sqlite3 **db); #endif #ifdef MSG_STORAGE_ENABLED -sqlite3 * linphone_message_storage_init(); +sqlite3 * linphone_message_storage_init(void); void linphone_message_storage_init_chat_rooms(LinphoneCore *lc); #endif void linphone_chat_message_store_state(LinphoneChatMessage *msg); @@ -1380,7 +1380,7 @@ void v_table_reference_destroy(VTableReference *ref); void _linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable, bool_t autorelease); #ifdef VIDEO_ENABLED LINPHONE_PUBLIC MSWebCam *linphone_call_get_video_device(const LinphoneCall *call); -MSWebCam *get_nowebcam_device(); +MSWebCam *get_nowebcam_device(void); #endif bool_t linphone_core_lime_for_file_sharing_enabled(const LinphoneCore *lc); diff --git a/coreapi/quality_reporting.h b/coreapi/quality_reporting.h index 07ad65055..7e30dafff 100644 --- a/coreapi/quality_reporting.h +++ b/coreapi/quality_reporting.h @@ -144,7 +144,7 @@ typedef struct reporting_session_report { typedef void (*LinphoneQualityReportingReportSendCb)(const LinphoneCall *call, SalStreamType stream_type, const LinphoneContent *content); -reporting_session_report_t * linphone_reporting_new(); +reporting_session_report_t * linphone_reporting_new(void); void linphone_reporting_destroy(reporting_session_report_t * report); /** diff --git a/gtk/audio_assistant.c b/gtk/audio_assistant.c index d12327304..b10a2c93a 100644 --- a/gtk/audio_assistant.c +++ b/gtk/audio_assistant.c @@ -62,7 +62,7 @@ static gboolean deactivate_play_button(void){ return FALSE; } -static gchar *get_record_file(){ +static gchar *get_record_file(void){ char filename[256]={0}; char date[64]={0}; time_t curtime=time(NULL); @@ -291,7 +291,7 @@ void display_popup(GtkMessageType type,const gchar *message){ gtk_widget_show(dialog); } -static void open_mixer(){ +static void open_mixer(void){ GError *error = NULL; #ifdef WIN32 @@ -320,7 +320,7 @@ static void open_mixer(){ #endif } -static GtkWidget *create_intro(){ +static GtkWidget *create_intro(void){ GtkWidget *vbox=gtk_vbox_new(FALSE,2); GtkWidget *label=gtk_label_new(_("Welcome!\nThis assistant will help you to configure audio settings for Linphone")); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2); @@ -328,7 +328,7 @@ static GtkWidget *create_intro(){ return vbox; } -static GtkWidget *create_mic_page(){ +static GtkWidget *create_mic_page(void){ GtkWidget *vbox=gtk_table_new(3,2,FALSE); LinphoneCore *lc=linphone_gtk_get_core(); const char **sound_devices; @@ -369,7 +369,7 @@ static GtkWidget *create_mic_page(){ return vbox; } -static GtkWidget *create_speaker_page(){ +static GtkWidget *create_speaker_page(void){ GtkWidget *vbox=gtk_table_new(3,2,FALSE); LinphoneCore *lc=linphone_gtk_get_core(); @@ -405,7 +405,7 @@ static GtkWidget *create_speaker_page(){ return vbox; } -static GtkWidget *create_play_record_page(){ +static GtkWidget *create_play_record_page(void){ GtkWidget *vbox=gtk_table_new(2,2,FALSE); GtkWidget *labelRecord=gtk_label_new(_("Press the record button and say some words")); GtkWidget *labelPlay=gtk_label_new(_("Listen to your record voice")); @@ -435,7 +435,7 @@ static GtkWidget *create_play_record_page(){ return vbox; } -static GtkWidget *create_end_page(){ +static GtkWidget *create_end_page(void){ GtkWidget *vbox=gtk_vbox_new(FALSE,2); GtkWidget *label=gtk_label_new(_("Let's start Linphone now")); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2); diff --git a/gtk/calllogs.c b/gtk/calllogs.c index 8c0004a81..713ed6e96 100644 --- a/gtk/calllogs.c +++ b/gtk/calllogs.c @@ -239,7 +239,7 @@ gboolean linphone_gtk_call_log_button_pressed(GtkWidget *widget, GdkEventButton return FALSE; } -void linphone_gtk_call_log_clear_missed_call(){ +void linphone_gtk_call_log_clear_missed_call(void){ GtkWidget *mw = linphone_gtk_get_main_window(); GtkWidget *label = linphone_gtk_get_widget(mw, "history_tab_label"); gtk_label_set_text(GTK_LABEL(label), _("Recent calls")); diff --git a/gtk/chat.c b/gtk/chat.c index d098d52b9..ccae62bd0 100644 --- a/gtk/chat.c +++ b/gtk/chat.c @@ -285,7 +285,7 @@ void linphone_gtk_compose_text(void) { } } -void linphone_gtk_send_text(){ +void linphone_gtk_send_text(void){ GtkWidget *main_window=linphone_gtk_get_main_window(); GtkWidget *friendlist=linphone_gtk_get_widget(main_window,"contact_list"); GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview"); diff --git a/gtk/friendlist.c b/gtk/friendlist.c index e4c6b5f88..120192483 100644 --- a/gtk/friendlist.c +++ b/gtk/friendlist.c @@ -17,7 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include "linphone.h" static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list); @@ -383,7 +382,7 @@ void linphone_gtk_remove_button_clicked(GtkWidget *button){ linphone_gtk_remove_contact(button); } -static GtkWidget * create_presence_menu(){ +static GtkWidget * create_presence_menu(void){ GtkWidget *menu=gtk_menu_new(); GtkWidget *menu_item; status_picture_tab_t *t; diff --git a/gtk/incall_view.c b/gtk/incall_view.c index 8149dea2f..e099b963d 100644 --- a/gtk/incall_view.c +++ b/gtk/incall_view.c @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "linphone.h" -gboolean linphone_gtk_use_in_call_view(){ +gboolean linphone_gtk_use_in_call_view(void){ static int val=-1; if (val==-1) val=linphone_gtk_get_ui_config_int("use_incall_view",1); return val; diff --git a/gtk/linphone.h b/gtk/linphone.h index 6bb1382b3..f337770fb 100644 --- a/gtk/linphone.h +++ b/gtk/linphone.h @@ -21,7 +21,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "config.h" #endif +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Wstrict-prototypes" + #include + +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic pop +#endif + #ifdef WIN32 // alloca is already defined by gtk #undef alloca @@ -109,9 +119,9 @@ char *linphone_gtk_call_logs_storage_get_db_file(const char *filename); LINPHONE_PUBLIC void linphone_gtk_close_assistant(void); LINPHONE_PUBLIC LinphoneCore *linphone_gtk_get_core(void); -LINPHONE_PUBLIC GtkWidget *linphone_gtk_get_main_window(); +LINPHONE_PUBLIC GtkWidget *linphone_gtk_get_main_window(void); LINPHONE_PUBLIC void linphone_gtk_display_something(GtkMessageType type, const gchar *message); -LINPHONE_PUBLIC void linphone_gtk_call_terminated(); +LINPHONE_PUBLIC void linphone_gtk_call_terminated(LinphoneCall *call, const char *error); LINPHONE_PUBLIC void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss); LINPHONE_PUBLIC void linphone_gtk_show_parameters(void); LINPHONE_PUBLIC void linphone_gtk_fill_soundcards(GtkWidget *pb); @@ -124,7 +134,7 @@ LINPHONE_PUBLIC void linphone_gtk_show_main_window(void); LINPHONE_PUBLIC void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args); LINPHONE_PUBLIC void linphone_gtk_destroy_log_window(void); LINPHONE_PUBLIC void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to); -LINPHONE_PUBLIC gboolean linphone_gtk_check_logs(); +LINPHONE_PUBLIC gboolean linphone_gtk_check_logs(void); LINPHONE_PUBLIC const gchar *linphone_gtk_get_ui_config(const char *key, const char *def); LINPHONE_PUBLIC int linphone_gtk_get_ui_config_int(const char *key, int def); LINPHONE_PUBLIC void linphone_gtk_set_ui_config_int(const char *key, int val); @@ -149,7 +159,7 @@ LINPHONE_PUBLIC void linphone_gtk_status_icon_set_blinking(gboolean val); LINPHONE_PUBLIC void linphone_gtk_notify(LinphoneCall *call, LinphoneChatMessage *chat_message, const char *msg); LINPHONE_PUBLIC void linphone_gtk_load_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *uri, GtkWidget *chat_view); -LINPHONE_PUBLIC void linphone_gtk_send_text(); +LINPHONE_PUBLIC void linphone_gtk_send_text(void); LINPHONE_PUBLIC GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with); LINPHONE_PUBLIC LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with); LINPHONE_PUBLIC void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *msg); @@ -170,7 +180,7 @@ LINPHONE_PUBLIC void linphone_gtk_show_contact(LinphoneFriend *lf, GtkWidget *pa LINPHONE_PUBLIC void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf); /*functions controlling the different views*/ -LINPHONE_PUBLIC gboolean linphone_gtk_use_in_call_view(); +LINPHONE_PUBLIC gboolean linphone_gtk_use_in_call_view(void); LINPHONE_PUBLIC LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf); LINPHONE_PUBLIC void linphone_gtk_create_in_call_view(LinphoneCall *call); LINPHONE_PUBLIC void linphone_gtk_in_call_view_set_calling(LinphoneCall *call); @@ -199,7 +209,7 @@ LINPHONE_PUBLIC void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gbo LINPHONE_PUBLIC void linphone_gtk_exit_login_frame(void); LINPHONE_PUBLIC void linphone_gtk_set_ui_config(const char *key, const char *value); -LINPHONE_PUBLIC void linphone_gtk_log_uninit(); +LINPHONE_PUBLIC void linphone_gtk_log_uninit(void); LINPHONE_PUBLIC bool_t linphone_gtk_init_instance(const char *app_name, int option, const char *addr_to_call); LINPHONE_PUBLIC void linphone_gtk_uninit_instance(void); diff --git a/gtk/logging.c b/gtk/logging.c index 00d40227a..59a99e0d7 100644 --- a/gtk/logging.c +++ b/gtk/logging.c @@ -57,7 +57,7 @@ static FILE *_logfile = NULL; /* Called on exit, print out the marker, close the file and avoid to continue logging. */ -void linphone_gtk_log_uninit() +void linphone_gtk_log_uninit(void) { if (_logfile != NULL) { fprintf(_logfile, "%s\n", LOGFILE_MARKER_STOP); @@ -70,7 +70,7 @@ void linphone_gtk_log_uninit() perform rotation, insert the start marker and return the pointer to the file that should be used for logging, or NULL on errors or if disabled. */ -static FILE *linphone_gtk_log_init() +static FILE *linphone_gtk_log_init(void) { static char _logdir[1024]; static char _logfname[1024]; @@ -302,7 +302,7 @@ void linphone_gtk_log_scroll_to_end(GtkToggleButton *button){ /* * called from Gtk main loop. **/ -gboolean linphone_gtk_check_logs(){ +gboolean linphone_gtk_check_logs(void){ GList *elem; GtkTextView *v=NULL; if (log_window) v=GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview")); diff --git a/gtk/main.c b/gtk/main.c index 3b2e05d5d..7dc818271 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -187,7 +187,7 @@ char *linphone_gtk_get_config_file(const char *filename){ #define FACTORY_CONFIG_FILE "linphonerc.factory" static char _factory_config_file[1024]; -static const char *linphone_gtk_get_factory_config_file(){ +static const char *linphone_gtk_get_factory_config_file(void){ char* path = NULL; /*try accessing a local file first if exists*/ if (access(FACTORY_CONFIG_FILE,F_OK)==0){ @@ -314,11 +314,11 @@ LinphoneCore *linphone_gtk_get_core(void){ return the_core; } -GtkWidget *linphone_gtk_get_main_window(){ +GtkWidget *linphone_gtk_get_main_window(void){ return the_ui; } -void linphone_gtk_destroy_main_window() { +void linphone_gtk_destroy_main_window(void) { linphone_gtk_destroy_window(the_ui); the_ui = NULL; } @@ -576,7 +576,7 @@ static gboolean uribar_completion_matchfunc(GtkEntryCompletion *completion, cons return ret; } -static void load_uri_history(){ +static void load_uri_history(void){ GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")); char key[20]; int i; @@ -603,7 +603,7 @@ static void load_uri_history(){ g_signal_connect (G_OBJECT (uribar), "changed", G_CALLBACK(linphone_gtk_on_uribar_changed), NULL); } -static void save_uri_history(){ +static void save_uri_history(void){ LinphoneCore *lc=linphone_gtk_get_core(); LpConfig *cfg=linphone_core_get_config(lc); GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")); @@ -1168,7 +1168,7 @@ static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl) } #ifdef HAVE_NOTIFY -static bool_t notify_actions_supported() { +static bool_t notify_actions_supported(void) { bool_t accepts_actions = FALSE; GList *capabilities = notify_get_server_caps(); GList *c; @@ -1498,7 +1498,7 @@ void linphone_gtk_link_to_website(GtkWidget *item){ linphone_gtk_open_browser(home); } -static GtkWidget *create_icon_menu(){ +static GtkWidget *create_icon_menu(void){ GtkWidget *menu=gtk_menu_new(); GtkWidget *menu_item; GtkWidget *image; @@ -1681,7 +1681,7 @@ static void linphone_gtk_check_menu_items(void){ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(selfview_item),selfview); } -static gboolean linphone_gtk_can_manage_accounts(){ +static gboolean linphone_gtk_can_manage_accounts(void){ LinphoneCore *lc=linphone_gtk_get_core(); const MSList *elem; for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){ @@ -1693,7 +1693,7 @@ static gboolean linphone_gtk_can_manage_accounts(){ return FALSE; } -static void linphone_gtk_configure_main_window(){ +static void linphone_gtk_configure_main_window(void){ static gboolean config_loaded=FALSE; static const char *title; static const char *home; @@ -1967,7 +1967,7 @@ void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to){ linphone_gtk_start_call(linphone_gtk_get_main_window()); } -static void linphone_gtk_check_soundcards(){ +static void linphone_gtk_check_soundcards(void){ const char **devices=linphone_core_get_sound_devices(linphone_gtk_get_core()); if (devices==NULL || devices[0]==NULL){ linphone_gtk_display_something(GTK_MESSAGE_WARNING, diff --git a/gtk/propertybox.c b/gtk/propertybox.c index a8a7f59e5..b996a5378 100644 --- a/gtk/propertybox.c +++ b/gtk/propertybox.c @@ -1496,7 +1496,7 @@ static gboolean apply_transports(PortConfigCtx *ctx){ return FALSE; } -static PortConfigCtx* get_port_config() { +static PortConfigCtx* get_port_config(void) { GtkWidget *mw=linphone_gtk_get_main_window(); PortConfigCtx *cfg=(PortConfigCtx*)g_object_get_data(G_OBJECT(mw),"port_config"); if (cfg==NULL){ diff --git a/gtk/status_icon.h b/gtk/status_icon.h index 233733724..2e4455659 100644 --- a/gtk/status_icon.h +++ b/gtk/status_icon.h @@ -22,9 +22,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * technology used to manage the status icon. */ +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Wstrict-prototypes" + #include #include +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic pop +#endif + + struct _LinphoneStatusIcon; typedef void (*LinphoneStatusIconOnClickCallback)(struct _LinphoneStatusIcon *si, void *user_data); diff --git a/gtk/update.c b/gtk/update.c index 34cff9995..26769c2b6 100644 --- a/gtk/update.c +++ b/gtk/update.c @@ -87,7 +87,7 @@ static gboolean popup_new_version(const char *download_site){ return FALSE; } -static gboolean popup_version_ok(){ +static gboolean popup_version_ok(void){ linphone_gtk_display_something(GTK_MESSAGE_INFO,_("You are running the lastest version.")); return FALSE; } diff --git a/gtk/utils.c b/gtk/utils.c index c4c7b428c..0d0ae64d0 100644 --- a/gtk/utils.c +++ b/gtk/utils.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "linphone.h" -static void run_gtk(){ +static void run_gtk(void){ while (gtk_events_pending ()) gtk_main_iteration (); diff --git a/include/sal/sal.h b/include/sal/sal.h index c5c8a1e21..6e1c4d068 100644 --- a/include/sal/sal.h +++ b/include/sal/sal.h @@ -122,7 +122,7 @@ void sal_address_set_password(SalAddress *addr, const char *passwd); const char *sal_address_get_password(const SalAddress *addr); void sal_address_set_header(SalAddress *addr, const char *header_name, const char *header_value); -LINPHONE_PUBLIC Sal * sal_init(); +LINPHONE_PUBLIC Sal * sal_init(void); LINPHONE_PUBLIC void sal_uninit(Sal* sal); void sal_set_user_pointer(Sal *sal, void *user_data); void *sal_get_user_pointer(const Sal *sal); @@ -294,7 +294,7 @@ typedef struct SalIsComposing { #define SAL_MEDIA_DESCRIPTION_MAX_MESSAGE_ATTRIBUTES 5 -SalMediaDescription *sal_media_description_new(); +SalMediaDescription *sal_media_description_new(void); SalMediaDescription * sal_media_description_ref(SalMediaDescription *md); void sal_media_description_unref(SalMediaDescription *md); bool_t sal_media_description_empty(const SalMediaDescription *md); @@ -535,7 +535,7 @@ typedef struct SalCallbacks{ -SalAuthInfo* sal_auth_info_new(); +SalAuthInfo* sal_auth_info_new(void); SalAuthInfo* sal_auth_info_clone(const SalAuthInfo* auth_info); void sal_auth_info_delete(SalAuthInfo* auth_info); LINPHONE_PUBLIC int sal_auth_compute_ha1(const char* userid,const char* realm,const char* password, char ha1[33]); @@ -797,9 +797,9 @@ void sal_custom_sdp_attribute_free(SalCustomSdpAttribute *csa); SalCustomSdpAttribute * sal_custom_sdp_attribute_clone(const SalCustomSdpAttribute *csa); /** deprecated. use sal_set_log_level instead **/ -void sal_enable_log(); +void sal_enable_log(void); /** deprecated. use sal_set_log_level instead **/ -void sal_disable_log(); +void sal_disable_log(void); void sal_set_log_level(OrtpLogLevel level); /*internal API */ diff --git a/mediastreamer2 b/mediastreamer2 index ff7a2ce9f..9bdec6f32 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit ff7a2ce9f467f468cd309141d964658968d69d14 +Subproject commit 9bdec6f326f44cc0e2fd083b140a0ef04ccf8d93 diff --git a/oRTP b/oRTP index 098054608..7f7cd3140 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 0980546087e9ebcd89b86b72843b71b5948e71b3 +Subproject commit 7f7cd314098ade26068e50ccaddddbce5da25be5 diff --git a/tester/call_tester.c b/tester/call_tester.c index 75734ffef..00c7ad594 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -5135,11 +5135,11 @@ end: linphone_core_manager_destroy(pauline); } -static void call_with_network_switch_in_early_state_1(){ +static void call_with_network_switch_in_early_state_1(void){ _call_with_network_switch_in_early_state(TRUE); } -static void call_with_network_switch_in_early_state_2(){ +static void call_with_network_switch_in_early_state_2(void){ _call_with_network_switch_in_early_state(FALSE); } diff --git a/tester/common/bc_tester_utils.c b/tester/common/bc_tester_utils.c index a5718e9d1..44b31f736 100644 --- a/tester/common/bc_tester_utils.c +++ b/tester/common/bc_tester_utils.c @@ -26,10 +26,19 @@ along with this program. If not, see . #include #include +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Wstrict-prototypes" + #include "CUnit/Basic.h" #include "CUnit/Automated.h" #include "CUnit/MyMem.h" +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic pop +#endif + #ifdef _WIN32 #if defined(__MINGW32__) || !defined(WINAPI_FAMILY_PARTITION) || !defined(WINAPI_PARTITION_DESKTOP) #define BC_TESTER_WINDOWS_DESKTOP 1 @@ -647,10 +656,10 @@ char* bc_sprintf(const char* format, ...) { return res; } -const char * bc_tester_current_suite_name() { +const char * bc_tester_current_suite_name(void) { return bc_current_suite_name; } -const char * bc_tester_current_test_name() { +const char * bc_tester_current_test_name(void) { return bc_current_test_name; } diff --git a/tester/common/bc_tester_utils.h b/tester/common/bc_tester_utils.h index 3317e191d..25acd0623 100644 --- a/tester/common/bc_tester_utils.h +++ b/tester/common/bc_tester_utils.h @@ -92,8 +92,8 @@ const char * bc_tester_test_name(const char *suite_name, int test_index); int bc_tester_run_suite(test_suite_t *suite); int bc_tester_run_tests(const char *suite_name, const char *test_name); int bc_tester_suite_index(const char *suite_name); -const char * bc_tester_current_suite_name(); -const char * bc_tester_current_test_name(); +const char * bc_tester_current_suite_name(void); +const char * bc_tester_current_test_name(void); char* bc_sprintfva(const char* format, va_list args); char* bc_sprintf(const char* format, ...); diff --git a/tester/complex_sip_call_tester.c b/tester/complex_sip_call_tester.c index d19da0ea2..605b10cba 100644 --- a/tester/complex_sip_call_tester.c +++ b/tester/complex_sip_call_tester.c @@ -142,7 +142,7 @@ static void sip_update_within_icoming_reinvite_with_no_sdp(void) { linphone_core_manager_destroy(mgr); } -static void call_with_audio_mline_before_video_in_sdp() { +static void call_with_audio_mline_before_video_in_sdp(void) { LinphoneCoreManager *mgr; char *identity_char; char *scen; @@ -183,7 +183,7 @@ static void call_with_audio_mline_before_video_in_sdp() { linphone_core_manager_destroy(mgr); } -static void call_with_video_mline_before_audio_in_sdp() { +static void call_with_video_mline_before_audio_in_sdp(void) { LinphoneCoreManager *mgr; char *identity_char; char *scen; @@ -224,7 +224,7 @@ static void call_with_video_mline_before_audio_in_sdp() { linphone_core_manager_destroy(mgr); } -static void call_with_multiple_audio_mline_in_sdp() { +static void call_with_multiple_audio_mline_in_sdp(void) { LinphoneCoreManager *mgr; char *identity_char; char *scen; @@ -265,7 +265,7 @@ static void call_with_multiple_audio_mline_in_sdp() { linphone_core_manager_destroy(mgr); } -static void call_with_multiple_video_mline_in_sdp() { +static void call_with_multiple_video_mline_in_sdp(void) { LinphoneCoreManager *mgr; char *identity_char; char *scen; @@ -307,7 +307,7 @@ static void call_with_multiple_video_mline_in_sdp() { } -static void call_invite_200ok_without_contact_header() { +static void call_invite_200ok_without_contact_header(void) { LinphoneCoreManager *mgr; char *identity_char; char *scen; diff --git a/tester/liblinphone_tester.c b/tester/liblinphone_tester.c index 4e764243d..2363fb886 100644 --- a/tester/liblinphone_tester.c +++ b/tester/liblinphone_tester.c @@ -23,10 +23,21 @@ #if HAVE_CU_CURSES #include "CUnit/CUCurses.h" #endif + +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Wstrict-prototypes" + #ifdef HAVE_GTK #include #endif +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic pop +#endif + + static FILE * log_file = NULL; #ifdef ANDROID diff --git a/tester/liblinphone_tester.h b/tester/liblinphone_tester.h index 61bb1c5ee..4cbe28046 100644 --- a/tester/liblinphone_tester.h +++ b/tester/liblinphone_tester.h @@ -256,7 +256,7 @@ typedef struct _LinphoneCallTestParams { } LinphoneCallTestParams; -void liblinphone_tester_add_suites(); +void liblinphone_tester_add_suites(void); LinphoneCoreManager* linphone_core_manager_init(const char* rc_file); void linphone_core_manager_start(LinphoneCoreManager *mgr, const char* rc_file, int check_for_proxies); diff --git a/tester/log_collection_tester.c b/tester/log_collection_tester.c index ff0c021e5..1a074b61f 100644 --- a/tester/log_collection_tester.c +++ b/tester/log_collection_tester.c @@ -89,7 +89,7 @@ static size_t getline(char **lineptr, size_t *n, FILE *stream) { #endif static LinphoneLogCollectionState old_collection_state; -static void collect_init() { +static void collect_init(void) { old_collection_state = linphone_core_log_collection_enabled(); linphone_core_set_log_collection_path(bc_tester_get_writable_dir_prefix()); } @@ -140,7 +140,7 @@ static FILE* gzuncompress(const char* filepath) { } #endif -static time_t get_current_time() { +static time_t get_current_time(void) { struct timeval tp; struct tm *lt; #ifndef _WIN32 @@ -161,7 +161,7 @@ static time_t get_current_time() { static time_t check_file(LinphoneCoreManager* mgr) { time_t cur_time = get_current_time(); - char* filepath = linphone_core_compress_log_collection(mgr->lc); + char* filepath = linphone_core_compress_log_collection(); time_t log_time = -1; uint32_t timediff = 0; FILE *file = NULL; @@ -239,7 +239,7 @@ static time_t check_file(LinphoneCoreManager* mgr) { static void collect_files_disabled(void) { LinphoneCoreManager* marie = setup(FALSE); - BC_ASSERT_PTR_NULL(linphone_core_compress_log_collection(marie->lc)); + BC_ASSERT_PTR_NULL(linphone_core_compress_log_collection()); collect_cleanup(marie); } @@ -301,15 +301,15 @@ static void upload_collected_traces(void) { linphone_core_set_log_collection_upload_server_url(marie->lc,"https://www.linphone.org:444/lft.php"); // Generate some logs while (--waiting) ms_error("(test error)Waiting %d...", waiting); - linphone_core_compress_log_collection(marie->lc); + linphone_core_compress_log_collection(); linphone_core_upload_log_collection(marie->lc); BC_ASSERT_TRUE(wait_for(marie->lc,marie->lc,&marie->stat.number_of_LinphoneCoreLogCollectionUploadStateDelivered,1)); /*try 2 times*/ waiting=100; - linphone_core_reset_log_collection(marie->lc); + linphone_core_reset_log_collection(); while (--waiting) ms_error("(test error)Waiting %d...", waiting); - linphone_core_compress_log_collection(marie->lc); + linphone_core_compress_log_collection(); linphone_core_upload_log_collection(marie->lc); BC_ASSERT_TRUE(wait_for(marie->lc,marie->lc,&marie->stat.number_of_LinphoneCoreLogCollectionUploadStateDelivered,2)); collect_cleanup(marie); diff --git a/tester/presence_tester.c b/tester/presence_tester.c index 9325617db..6a9d758cd 100644 --- a/tester/presence_tester.c +++ b/tester/presence_tester.c @@ -353,7 +353,7 @@ static void presence_information(void) { } -static void subscribe_presence_forked(){ +static void subscribe_presence_forked(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneCoreManager* pauline1 = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); LinphoneCoreManager* pauline2 = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); @@ -390,7 +390,7 @@ static void subscribe_presence_forked(){ ms_list_free(lcs); } -static void subscribe_presence_expired(){ +static void subscribe_presence_expired(void){ LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneCoreManager* pauline1 = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); LinphoneFriend *lf; diff --git a/tester/register_tester.c b/tester/register_tester.c index 0c93ff9b0..4a9282ebf 100644 --- a/tester/register_tester.c +++ b/tester/register_tester.c @@ -45,7 +45,7 @@ static LinphoneCoreManager* create_lcm_with_auth(unsigned int with_auth) { return lcm; } -static LinphoneCoreManager* create_lcm() { +static LinphoneCoreManager* create_lcm(void) { return create_lcm_with_auth(0); } diff --git a/tester/tester.c b/tester/tester.c index 40e507cab..9eb28c0d9 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -17,17 +17,28 @@ */ #include -#include "CUnit/TestRun.h" -#include "CUnit/Automated.h" #include "linphonecore.h" #include "private.h" #include "liblinphone_tester.h" + +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Wstrict-prototypes" + +#include "CUnit/TestRun.h" +#include "CUnit/Automated.h" #if HAVE_CU_CURSES #include "CUnit/CUCurses.h" #endif #ifdef HAVE_GTK #include #endif + +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic pop +#endif + #if _WIN32 #define unlink _unlink #endif diff --git a/tester/video_tester.c b/tester/video_tester.c index 1658f765f..6dc165bf6 100644 --- a/tester/video_tester.c +++ b/tester/video_tester.c @@ -24,6 +24,11 @@ #include "liblinphone_tester.h" #include "lpconfig.h" +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Wstrict-prototypes" + #if HAVE_GTK #include #ifdef GDK_WINDOWING_X11 @@ -37,6 +42,10 @@ extern void *gdk_quartz_window_get_nsview(GdkWindow *window); #include +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) +#pragma GCC diagnostic pop +#endif + static void *get_native_handle(GdkWindow *gdkw) { #ifdef GDK_WINDOWING_X11