Commit 17c10725 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix compilation warning

parent cef38468
......@@ -31,13 +31,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define CONFIG_FILE ".linphone-history.db"
const char *linphone_gtk_message_storage_get_db_file(const char *filename){
char *linphone_gtk_message_storage_get_db_file(const char *filename){
const int path_max=1024;
static char *db_file=NULL;
char *db_file=NULL;
if (db_file) return db_file;
db_file=(char *)malloc(path_max*sizeof(char));
db_file=(char *)g_malloc(path_max*sizeof(char));
if (filename==NULL) filename=CONFIG_FILE;
/*try accessing a local file first if exists*/
if (access(CONFIG_FILE,F_OK)==0){
......
......@@ -100,7 +100,7 @@ LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_window(const char *window_name, G
LINPHONE_PUBLIC GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_widget(const char* widget_name);
const char *linphone_gtk_message_storage_get_db_file(const char *filename);
char *linphone_gtk_message_storage_get_db_file(const char *filename);
LINPHONE_PUBLIC void linphone_gtk_show_assistant(GtkWidget* parent);
LINPHONE_PUBLIC void linphone_gtk_close_assistant(void);
......
......@@ -2063,7 +2063,7 @@ int main(int argc, char *argv[]){
GdkPixbuf *pbuf;
const char *app_name="Linphone";
LpConfig *factory;
const char *db_file;
char *db_file;
GError *error=NULL;
const char *tmp;
......@@ -2215,7 +2215,7 @@ core_start:
db_file=linphone_gtk_message_storage_get_db_file(NULL);
linphone_gtk_init_liblinphone(config_file, factory_config_file, db_file);
free(db_file);
g_free(db_file);
/* do not lower timeouts under 30 ms because it exhibits a bug on gtk+/win32, with cpu running 20% all the time...*/
gtk_timeout_add(30,(GtkFunction)linphone_gtk_iterate,(gpointer)linphone_gtk_get_core());
......
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