Commit cafb1dfa authored by Ghislain MARY's avatar Ghislain MARY

Fix strict-prototypes warnings.

parent 87fa413e
...@@ -638,11 +638,11 @@ lpc_cmd_chat(LinphoneCore *lc, char *args) ...@@ -638,11 +638,11 @@ lpc_cmd_chat(LinphoneCore *lc, char *args)
return 1; return 1;
} }
const char *linphonec_get_callee(){ const char *linphonec_get_callee(void){
return callee_name; return callee_name;
} }
const char *linphonec_get_caller(){ const char *linphonec_get_caller(void){
return caller_name; return caller_name;
} }
......
...@@ -593,7 +593,7 @@ void linphonec_set_autoanswer(bool_t enabled){ ...@@ -593,7 +593,7 @@ void linphonec_set_autoanswer(bool_t enabled){
auto_answer=enabled; auto_answer=enabled;
} }
bool_t linphonec_get_autoanswer(){ bool_t linphonec_get_autoanswer(void){
return auto_answer; return auto_answer;
} }
...@@ -965,7 +965,7 @@ static void x11_apply_video_params(VideoParams *params, Window window){ ...@@ -965,7 +965,7 @@ static void x11_apply_video_params(VideoParams *params, Window window){
#endif #endif
static void lpc_apply_video_params(){ static void lpc_apply_video_params(void){
static void *old_wid=NULL; static void *old_wid=NULL;
static void *old_pwid=NULL; static void *old_pwid=NULL;
void *wid=linphone_core_get_native_video_window_id(linphonec); void *wid=linphone_core_get_native_video_window_id(linphonec);
......
...@@ -116,11 +116,11 @@ extern VideoParams lpc_preview_params; ...@@ -116,11 +116,11 @@ extern VideoParams lpc_preview_params;
extern int linphonec_parse_command_line(LinphoneCore *lc, char *cl); extern int linphonec_parse_command_line(LinphoneCore *lc, char *cl);
extern char *linphonec_command_generator(const char *text, int state); 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 void linphonec_finish(int exit_status);
extern char *linphonec_readline(char *prompt); extern char *linphonec_readline(char *prompt);
void linphonec_set_autoanswer(bool_t enabled); 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_command_finished(void);
void linphonec_set_caller(const char *caller); void linphonec_set_caller(const char *caller);
LinphoneCall *linphonec_get_call(long id); LinphoneCall *linphonec_get_call(long id);
......
...@@ -510,7 +510,7 @@ void *sal_get_user_pointer(const Sal *sal){ ...@@ -510,7 +510,7 @@ void *sal_get_user_pointer(const Sal *sal){
return sal->up; return sal->up;
} }
static void unimplemented_stub(){ static void unimplemented_stub(void){
ms_warning("Unimplemented SAL callback"); ms_warning("Unimplemented SAL callback");
} }
......
...@@ -38,4 +38,4 @@ LINPHONE_PUBLIC unsigned int linphone_ldap_contact_provider_get_ ...@@ -38,4 +38,4 @@ LINPHONE_PUBLIC unsigned int linphone_ldap_contact_provider_get_
LINPHONE_PUBLIC LinphoneLDAPContactProvider* linphone_ldap_contact_provider_ref( void* obj ); LINPHONE_PUBLIC LinphoneLDAPContactProvider* linphone_ldap_contact_provider_ref( void* obj );
void linphone_ldap_contact_provider_unref( void* obj ); void linphone_ldap_contact_provider_unref( void* obj );
LinphoneLDAPContactProvider* linphone_ldap_contact_provider_cast( 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);
...@@ -182,5 +182,5 @@ LINPHONE_PUBLIC char *lime_error_code_to_string(int errorCode); ...@@ -182,5 +182,5 @@ LINPHONE_PUBLIC char *lime_error_code_to_string(int errorCode);
* *
* @return TRUE if Lime is available, FALSE if not * @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 */ #endif /* LIME_H */
...@@ -687,7 +687,7 @@ void linphone_core_upload_log_collection(LinphoneCore *core) { ...@@ -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; char *filename = NULL;
if (liblinphone_log_collection_state == LinphoneLogCollectionDisabled) return NULL; if (liblinphone_log_collection_state == LinphoneLogCollectionDisabled) return NULL;
filename = ms_strdup_printf("%s_log.%s", filename = ms_strdup_printf("%s_log.%s",
...@@ -704,7 +704,7 @@ char * linphone_core_compress_log_collection() { ...@@ -704,7 +704,7 @@ char * linphone_core_compress_log_collection() {
COMPRESSED_LOG_COLLECTION_EXTENSION); COMPRESSED_LOG_COLLECTION_EXTENSION);
} }
void linphone_core_reset_log_collection() { void linphone_core_reset_log_collection(void) {
char *filename; char *filename;
ortp_mutex_lock(&liblinphone_log_collection_mutex); ortp_mutex_lock(&liblinphone_log_collection_mutex);
clean_log_collection_upload_context(NULL); clean_log_collection_upload_context(NULL);
......
...@@ -2089,7 +2089,7 @@ typedef struct _LinphoneCoreVTable{ ...@@ -2089,7 +2089,7 @@ typedef struct _LinphoneCoreVTable{
* Instantiate a vtable with all arguments set to NULL * Instantiate a vtable with all arguments set to NULL
* @return newly allocated vtable * @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. * Sets a user data pointer in the vtable.
...@@ -2238,13 +2238,13 @@ LINPHONE_PUBLIC void linphone_core_upload_log_collection(LinphoneCore *core); ...@@ -2238,13 +2238,13 @@ LINPHONE_PUBLIC void linphone_core_upload_log_collection(LinphoneCore *core);
* @ingroup misc * @ingroup misc
* @return The path of the compressed log collection file (to be freed calling ms_free()). * @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. * Reset the log collection by removing the log files.
* @ingroup misc * @ingroup misc
*/ */
LINPHONE_PUBLIC void linphone_core_reset_log_collection(); LINPHONE_PUBLIC void linphone_core_reset_log_collection(void);
/** /**
* Define a log handler. * Define a log handler.
......
...@@ -388,7 +388,7 @@ void linphone_core_update_friends_subscriptions(LinphoneCore *lc, LinphoneProxyC ...@@ -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); 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); 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){ 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 ...@@ -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); 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) #define linphone_core_ready(lc) ((lc)->state==LinphoneGlobalOn || (lc)->state==LinphoneGlobalShutdown)
void _linphone_core_configure_resolver(); void _linphone_core_configure_resolver(void);
struct _EcCalibrator{ struct _EcCalibrator{
ms_thread_t thread; ms_thread_t thread;
...@@ -1041,7 +1041,7 @@ int _linphone_sqlite3_open(const char *db_file, sqlite3 **db); ...@@ -1041,7 +1041,7 @@ int _linphone_sqlite3_open(const char *db_file, sqlite3 **db);
#endif #endif
#ifdef MSG_STORAGE_ENABLED #ifdef MSG_STORAGE_ENABLED
sqlite3 * linphone_message_storage_init(); sqlite3 * linphone_message_storage_init(void);
void linphone_message_storage_init_chat_rooms(LinphoneCore *lc); void linphone_message_storage_init_chat_rooms(LinphoneCore *lc);
#endif #endif
void linphone_chat_message_store_state(LinphoneChatMessage *msg); void linphone_chat_message_store_state(LinphoneChatMessage *msg);
...@@ -1380,7 +1380,7 @@ void v_table_reference_destroy(VTableReference *ref); ...@@ -1380,7 +1380,7 @@ void v_table_reference_destroy(VTableReference *ref);
void _linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable, bool_t autorelease); void _linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable, bool_t autorelease);
#ifdef VIDEO_ENABLED #ifdef VIDEO_ENABLED
LINPHONE_PUBLIC MSWebCam *linphone_call_get_video_device(const LinphoneCall *call); LINPHONE_PUBLIC MSWebCam *linphone_call_get_video_device(const LinphoneCall *call);
MSWebCam *get_nowebcam_device(); MSWebCam *get_nowebcam_device(void);
#endif #endif
bool_t linphone_core_lime_for_file_sharing_enabled(const LinphoneCore *lc); bool_t linphone_core_lime_for_file_sharing_enabled(const LinphoneCore *lc);
......
...@@ -144,7 +144,7 @@ typedef struct reporting_session_report { ...@@ -144,7 +144,7 @@ typedef struct reporting_session_report {
typedef void (*LinphoneQualityReportingReportSendCb)(const LinphoneCall *call, SalStreamType stream_type, const LinphoneContent *content); 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); void linphone_reporting_destroy(reporting_session_report_t * report);
/** /**
......
...@@ -62,7 +62,7 @@ static gboolean deactivate_play_button(void){ ...@@ -62,7 +62,7 @@ static gboolean deactivate_play_button(void){
return FALSE; return FALSE;
} }
static gchar *get_record_file(){ static gchar *get_record_file(void){
char filename[256]={0}; char filename[256]={0};
char date[64]={0}; char date[64]={0};
time_t curtime=time(NULL); time_t curtime=time(NULL);
...@@ -291,7 +291,7 @@ void display_popup(GtkMessageType type,const gchar *message){ ...@@ -291,7 +291,7 @@ void display_popup(GtkMessageType type,const gchar *message){
gtk_widget_show(dialog); gtk_widget_show(dialog);
} }
static void open_mixer(){ static void open_mixer(void){
GError *error = NULL; GError *error = NULL;
#ifdef WIN32 #ifdef WIN32
...@@ -320,7 +320,7 @@ static void open_mixer(){ ...@@ -320,7 +320,7 @@ static void open_mixer(){
#endif #endif
} }
static GtkWidget *create_intro(){ static GtkWidget *create_intro(void){
GtkWidget *vbox=gtk_vbox_new(FALSE,2); GtkWidget *vbox=gtk_vbox_new(FALSE,2);
GtkWidget *label=gtk_label_new(_("Welcome!\nThis assistant will help you to configure audio settings for Linphone")); 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); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
...@@ -328,7 +328,7 @@ static GtkWidget *create_intro(){ ...@@ -328,7 +328,7 @@ static GtkWidget *create_intro(){
return vbox; return vbox;
} }
static GtkWidget *create_mic_page(){ static GtkWidget *create_mic_page(void){
GtkWidget *vbox=gtk_table_new(3,2,FALSE); GtkWidget *vbox=gtk_table_new(3,2,FALSE);
LinphoneCore *lc=linphone_gtk_get_core(); LinphoneCore *lc=linphone_gtk_get_core();
const char **sound_devices; const char **sound_devices;
...@@ -369,7 +369,7 @@ static GtkWidget *create_mic_page(){ ...@@ -369,7 +369,7 @@ static GtkWidget *create_mic_page(){
return vbox; return vbox;
} }
static GtkWidget *create_speaker_page(){ static GtkWidget *create_speaker_page(void){
GtkWidget *vbox=gtk_table_new(3,2,FALSE); GtkWidget *vbox=gtk_table_new(3,2,FALSE);
LinphoneCore *lc=linphone_gtk_get_core(); LinphoneCore *lc=linphone_gtk_get_core();
...@@ -405,7 +405,7 @@ static GtkWidget *create_speaker_page(){ ...@@ -405,7 +405,7 @@ static GtkWidget *create_speaker_page(){
return vbox; return vbox;
} }
static GtkWidget *create_play_record_page(){ static GtkWidget *create_play_record_page(void){
GtkWidget *vbox=gtk_table_new(2,2,FALSE); GtkWidget *vbox=gtk_table_new(2,2,FALSE);
GtkWidget *labelRecord=gtk_label_new(_("Press the record button and say some words")); GtkWidget *labelRecord=gtk_label_new(_("Press the record button and say some words"));
GtkWidget *labelPlay=gtk_label_new(_("Listen to your record voice")); GtkWidget *labelPlay=gtk_label_new(_("Listen to your record voice"));
...@@ -435,7 +435,7 @@ static GtkWidget *create_play_record_page(){ ...@@ -435,7 +435,7 @@ static GtkWidget *create_play_record_page(){
return vbox; return vbox;
} }
static GtkWidget *create_end_page(){ static GtkWidget *create_end_page(void){
GtkWidget *vbox=gtk_vbox_new(FALSE,2); GtkWidget *vbox=gtk_vbox_new(FALSE,2);
GtkWidget *label=gtk_label_new(_("Let's start Linphone now")); GtkWidget *label=gtk_label_new(_("Let's start Linphone now"));
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
......
...@@ -239,7 +239,7 @@ gboolean linphone_gtk_call_log_button_pressed(GtkWidget *widget, GdkEventButton ...@@ -239,7 +239,7 @@ gboolean linphone_gtk_call_log_button_pressed(GtkWidget *widget, GdkEventButton
return FALSE; 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 *mw = linphone_gtk_get_main_window();
GtkWidget *label = linphone_gtk_get_widget(mw, "history_tab_label"); GtkWidget *label = linphone_gtk_get_widget(mw, "history_tab_label");
gtk_label_set_text(GTK_LABEL(label), _("Recent calls")); gtk_label_set_text(GTK_LABEL(label), _("Recent calls"));
......
...@@ -285,7 +285,7 @@ void linphone_gtk_compose_text(void) { ...@@ -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 *main_window=linphone_gtk_get_main_window();
GtkWidget *friendlist=linphone_gtk_get_widget(main_window,"contact_list"); GtkWidget *friendlist=linphone_gtk_get_widget(main_window,"contact_list");
GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview"); GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
......
...@@ -17,7 +17,6 @@ along with this program; if not, write to the Free Software ...@@ -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. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <gtk/gtk.h>
#include "linphone.h" #include "linphone.h"
static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list); static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list);
...@@ -383,7 +382,7 @@ void linphone_gtk_remove_button_clicked(GtkWidget *button){ ...@@ -383,7 +382,7 @@ void linphone_gtk_remove_button_clicked(GtkWidget *button){
linphone_gtk_remove_contact(button); linphone_gtk_remove_contact(button);
} }
static GtkWidget * create_presence_menu(){ static GtkWidget * create_presence_menu(void){
GtkWidget *menu=gtk_menu_new(); GtkWidget *menu=gtk_menu_new();
GtkWidget *menu_item; GtkWidget *menu_item;
status_picture_tab_t *t; status_picture_tab_t *t;
......
...@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "linphone.h" #include "linphone.h"
gboolean linphone_gtk_use_in_call_view(){ gboolean linphone_gtk_use_in_call_view(void){
static int val=-1; static int val=-1;
if (val==-1) val=linphone_gtk_get_ui_config_int("use_incall_view",1); if (val==-1) val=linphone_gtk_get_ui_config_int("use_incall_view",1);
return val; return val;
......
...@@ -21,7 +21,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -21,7 +21,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h" #include "config.h"
#endif #endif
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#include <gtk/gtk.h> #include <gtk/gtk.h>
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic pop
#endif
#ifdef WIN32 #ifdef WIN32
// alloca is already defined by gtk // alloca is already defined by gtk
#undef alloca #undef alloca
...@@ -109,9 +119,9 @@ char *linphone_gtk_call_logs_storage_get_db_file(const char *filename); ...@@ -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 void linphone_gtk_close_assistant(void);
LINPHONE_PUBLIC LinphoneCore *linphone_gtk_get_core(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_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_set_my_presence(LinphoneOnlineStatus ss);
LINPHONE_PUBLIC void linphone_gtk_show_parameters(void); LINPHONE_PUBLIC void linphone_gtk_show_parameters(void);
LINPHONE_PUBLIC void linphone_gtk_fill_soundcards(GtkWidget *pb); LINPHONE_PUBLIC void linphone_gtk_fill_soundcards(GtkWidget *pb);
...@@ -124,7 +134,7 @@ LINPHONE_PUBLIC void linphone_gtk_show_main_window(void); ...@@ -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_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
LINPHONE_PUBLIC void linphone_gtk_destroy_log_window(void); LINPHONE_PUBLIC void linphone_gtk_destroy_log_window(void);
LINPHONE_PUBLIC void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to); 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 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 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); 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); ...@@ -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_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_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 GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with);
LINPHONE_PUBLIC LinphoneChatRoom * linphone_gtk_create_chatroom(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); 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 ...@@ -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); LINPHONE_PUBLIC void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
/*functions controlling the different views*/ /*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 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_create_in_call_view(LinphoneCall *call);
LINPHONE_PUBLIC void linphone_gtk_in_call_view_set_calling(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 ...@@ -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_exit_login_frame(void);
LINPHONE_PUBLIC void linphone_gtk_set_ui_config(const char *key, const char *value); 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 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); LINPHONE_PUBLIC void linphone_gtk_uninit_instance(void);
......
...@@ -57,7 +57,7 @@ static FILE *_logfile = NULL; ...@@ -57,7 +57,7 @@ static FILE *_logfile = NULL;
/* Called on exit, print out the marker, close the file and avoid to /* Called on exit, print out the marker, close the file and avoid to
continue logging. */ continue logging. */
void linphone_gtk_log_uninit() void linphone_gtk_log_uninit(void)
{ {
if (_logfile != NULL) { if (_logfile != NULL) {
fprintf(_logfile, "%s\n", LOGFILE_MARKER_STOP); fprintf(_logfile, "%s\n", LOGFILE_MARKER_STOP);
...@@ -70,7 +70,7 @@ void linphone_gtk_log_uninit() ...@@ -70,7 +70,7 @@ void linphone_gtk_log_uninit()
perform rotation, insert the start marker and return the pointer to 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 the file that should be used for logging, or NULL on errors or if
disabled. */ disabled. */
static FILE *linphone_gtk_log_init() static FILE *linphone_gtk_log_init(void)
{ {
static char _logdir[1024]; static char _logdir[1024];
static char _logfname[1024]; static char _logfname[1024];
...@@ -302,7 +302,7 @@ void linphone_gtk_log_scroll_to_end(GtkToggleButton *button){ ...@@ -302,7 +302,7 @@ void linphone_gtk_log_scroll_to_end(GtkToggleButton *button){
/* /*
* called from Gtk main loop. * called from Gtk main loop.
**/ **/
gboolean linphone_gtk_check_logs(){ gboolean linphone_gtk_check_logs(void){
GList *elem; GList *elem;
GtkTextView *v=NULL; GtkTextView *v=NULL;
if (log_window) v=GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview")); if (log_window) v=GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview"));
......
...@@ -187,7 +187,7 @@ char *linphone_gtk_get_config_file(const char *filename){ ...@@ -187,7 +187,7 @@ char *linphone_gtk_get_config_file(const char *filename){
#define FACTORY_CONFIG_FILE "linphonerc.factory" #define FACTORY_CONFIG_FILE "linphonerc.factory"
static char _factory_config_file[1024]; 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; char* path = NULL;
/*try accessing a local file first if exists*/ /*try accessing a local file first if exists*/
if (access(FACTORY_CONFIG_FILE,F_OK)==0){ if (access(FACTORY_CONFIG_FILE,F_OK)==0){
...@@ -314,11 +314,11 @@ LinphoneCore *linphone_gtk_get_core(void){ ...@@ -314,11 +314,11 @@ LinphoneCore *linphone_gtk_get_core(void){
return the_core; return the_core;
} }
GtkWidget *linphone_gtk_get_main_window(){ GtkWidget *linphone_gtk_get_main_window(void){
return the_ui; return the_ui;
} }
void linphone_gtk_destroy_main_window() { void linphone_gtk_destroy_main_window(void) {
linphone_gtk_destroy_window(the_ui); linphone_gtk_destroy_window(the_ui);
the_ui = NULL; the_ui = NULL;
} }
...@@ -576,7 +576,7 @@ static gboolean uribar_completion_matchfunc(GtkEntryCompletion *completion, cons ...@@ -576,7 +576,7 @@ static gboolean uribar_completion_matchfunc(GtkEntryCompletion *completion, cons
return ret; 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")); GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar"));
char key[20]; char key[20];
int i; int i;
...@@ -603,7 +603,7 @@ static void load_uri_history(){ ...@@ -603,7 +603,7 @@ static void load_uri_history(){
g_signal_connect (G_OBJECT (uribar), "changed", G_CALLBACK(linphone_gtk_on_uribar_changed), NULL); 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(); LinphoneCore *lc=linphone_gtk_get_core();
LpConfig *cfg=linphone_core_get_config(lc); LpConfig *cfg=linphone_core_get_config(lc);
GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")); 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) ...@@ -1168,7 +1168,7 @@ static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl)
} }
#ifdef HAVE_NOTIFY #ifdef HAVE_NOTIFY
static bool_t notify_actions_supported() { static bool_t notify_actions_supported(void) {
bool_t accepts_actions = FALSE; bool_t accepts_actions = FALSE;
GList *capabilities = notify_get_server_caps(); GList *capabilities = notify_get_server_caps();
GList *c; GList *c;
...@@ -1498,7 +1498,7 @@ void linphone_gtk_link_to_website(GtkWidget *item){ ...@@ -1498,7 +1498,7 @@ void linphone_gtk_link_to_website(GtkWidget *item){
linphone_gtk_open_browser(home); linphone_gtk_open_browser(home);
} }
static GtkWidget *create_icon_menu(){ static GtkWidget *create_icon_menu(void){
GtkWidget *menu=gtk_menu_new(); GtkWidget *menu=gtk_menu_new();
GtkWidget *menu_item; GtkWidget *menu_item;
GtkWidget *image; GtkWidget *image;
...@@ -1681,7 +1681,7 @@ static void linphone_gtk_check_menu_items(void){ ...@@ -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); 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(); LinphoneCore *lc=linphone_gtk_get_core();
const MSList *elem; const MSList *elem;
for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){ for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
...@@ -1693,7 +1693,7 @@ static gboolean linphone_gtk_can_manage_accounts(){ ...@@ -1693,7 +1693,7 @@ static gboolean linphone_gtk_can_manage_accounts(){
return FALSE; return FALSE;
} }
static void linphone_gtk_configure_main_window(){ static void linphone_gtk_configure_main_window(void){
static gboolean config_loaded=FALSE; static gboolean config_loaded=FALSE;
static const char *title; static const char *title;
static const char *home; static const char *home;
...@@ -1967,7 +1967,7 @@ void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to){ ...@@ -1967,7 +1967,7 @@ void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to){
linphone_gtk_start_call(linphone_gtk_get_main_window()); 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()); const char **devices=linphone_core_get_sound_devices(linphone_gtk_get_core());
if (devices==NULL || devices[0]==NULL){ if (devices==NULL || devices[0]==NULL){
linphone_gtk_display_something(GTK_MESSAGE_WARNING, linphone_gtk_display_something(GTK_MESSAGE_WARNING,
......
...@@ -1496,7 +1496,7 @@ static gboolean apply_transports(PortConfigCtx *ctx){ ...@@ -1496,7 +1496,7 @@ static gboolean apply_transports(PortConfigCtx *ctx){
return FALSE; return FALSE;
} }
static PortConfigCtx* get_port_config() { static PortConfigCtx* get_port_config(void) {
GtkWidget *mw=linphone_gtk_get_main_window(); GtkWidget *mw=linphone_gtk_get_main_window();
PortConfigCtx *cfg=(PortConfigCtx*)g_object_get_data(G_OBJECT(mw),"port_config"); PortConfigCtx *cfg=(PortConfigCtx*)g_object_get_data(G_OBJECT(mw),"port_config");
if (cfg==NULL){ if (cfg==NULL){
......
...@@ -22,9 +22,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -22,9 +22,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* technology used to manage the status icon. * 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 <glib.h> #include <glib.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic pop
#endif
struct _LinphoneStatusIcon; struct _LinphoneStatusIcon;
typedef void (*LinphoneStatusIconOnClickCallback)(struct _LinphoneStatusIcon *si, void *user_data); typedef void (*LinphoneStatusIconOnClickCallback)(struct _LinphoneStatusIcon *si, void *user_data);
......
...@@ -87,7 +87,7 @@ static gboolean popup_new_version(const char *download_site){ ...@@ -87,7 +87,7 @@ static gboolean popup_new_version(const char *download_site){
return FALSE; 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.")); linphone_gtk_display_something(GTK_MESSAGE_INFO,_("You are running the lastest version."));
return FALSE; return FALSE;
} }
......
...@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "linphone.h" #include "linphone.h"
static void run_gtk(){ static void run_gtk(void){
while (gtk_events_pending ()) while (gtk_events_pending ())
gtk_main_iteration (); gtk_main_iteration ();
......