From 3b00085ae9806e4b291e8f08706bf582b98ced91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Tue, 17 Jul 2007 12:37:48 +0000 Subject: [PATCH] Fix compiler warnings. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1715 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/document.c | 8 ++++---- tagmanager/ctags.c | 1 + tagmanager/entry.c | 1 + tagmanager/read.c | 1 + tagmanager/regex.c | 1 + tagmanager/sort.c | 1 + tagmanager/strlist.c | 1 + tagmanager/tm_file_entry.c | 1 + tagmanager/tm_project.c | 1 + tagmanager/tm_work_object.c | 1 + tagmanager/tm_workspace.c | 1 + 11 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/document.c b/src/document.c index 611130c0..a26a048b 100644 --- a/src/document.c +++ b/src/document.c @@ -1085,7 +1085,7 @@ gboolean document_save_file(gint idx, gboolean force) // ignore the following things if we are quitting if (! app->quitting) { - gchar *basename = g_path_get_basename(doc_list[idx].file_name); + gchar *base_name = g_path_get_basename(doc_list[idx].file_name); // set line numbers again, to reset the margin width, if // there are more lines than before @@ -1103,11 +1103,11 @@ gboolean document_save_file(gint idx, gboolean force) } document_set_filetype(idx, doc_list[idx].file_type); tm_workspace_update(TM_WORK_OBJECT(app->tm_workspace), TRUE, TRUE, FALSE); - gtk_label_set_text(GTK_LABEL(doc_list[idx].tab_label), basename); - gtk_label_set_text(GTK_LABEL(doc_list[idx].tabmenu_label), basename); + gtk_label_set_text(GTK_LABEL(doc_list[idx].tab_label), base_name); + gtk_label_set_text(GTK_LABEL(doc_list[idx].tabmenu_label), base_name); msgwin_status_add(_("File %s saved."), doc_list[idx].file_name); ui_update_statusbar(idx, -1); - g_free(basename); + g_free(base_name); #ifdef HAVE_VTE vte_cwd(doc_list[idx].file_name, FALSE); #endif diff --git a/tagmanager/ctags.c b/tagmanager/ctags.c index 18781e87..f1604adc 100644 --- a/tagmanager/ctags.c +++ b/tagmanager/ctags.c @@ -21,6 +21,7 @@ */ #include "general.h" /* must always come first */ #include +#include #ifdef HAVE_STDLIB_H # include /* to declare malloc (), realloc () */ diff --git a/tagmanager/entry.c b/tagmanager/entry.c index c573f614..dd0e5c65 100644 --- a/tagmanager/entry.c +++ b/tagmanager/entry.c @@ -17,6 +17,7 @@ #include /* to define isspace () */ #include #include +#include #if defined (HAVE_SYS_TYPES_H) # include /* to declare off_t on some hosts */ diff --git a/tagmanager/read.c b/tagmanager/read.c index e295248e..e0cba15e 100644 --- a/tagmanager/read.c +++ b/tagmanager/read.c @@ -16,6 +16,7 @@ #include #include +#include #define FILE_WRITE #include "read.h" diff --git a/tagmanager/regex.c b/tagmanager/regex.c index d9f14e99..9fee7aa0 100644 --- a/tagmanager/regex.c +++ b/tagmanager/regex.c @@ -27,6 +27,7 @@ # endif # include "regex.h" #endif +#include #include "entry.h" #include "main.h" diff --git a/tagmanager/sort.c b/tagmanager/sort.c index a1e85064..9c7632f2 100644 --- a/tagmanager/sort.c +++ b/tagmanager/sort.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "entry.h" #include "main.h" diff --git a/tagmanager/strlist.c b/tagmanager/strlist.c index 3c30d739..aa42ef71 100644 --- a/tagmanager/strlist.c +++ b/tagmanager/strlist.c @@ -18,6 +18,7 @@ #ifdef HAVE_FNMATCH_H # include #endif +#include #include "main.h" #include "read.h" diff --git a/tagmanager/tm_file_entry.c b/tagmanager/tm_file_entry.c index 7526dcaa..311121b9 100644 --- a/tagmanager/tm_file_entry.c +++ b/tagmanager/tm_file_entry.c @@ -22,6 +22,7 @@ #ifdef HAVE_FNMATCH_H # include #endif +#include #include "tm_work_object.h" #include "tm_file_entry.h" diff --git a/tagmanager/tm_project.c b/tagmanager/tm_project.c index eded2592..85b80027 100644 --- a/tagmanager/tm_project.c +++ b/tagmanager/tm_project.c @@ -18,6 +18,7 @@ #ifdef HAVE_FNMATCH_H # include #endif +#include #include "options.h" diff --git a/tagmanager/tm_work_object.c b/tagmanager/tm_work_object.c index c652bbc0..4dfc317b 100644 --- a/tagmanager/tm_work_object.c +++ b/tagmanager/tm_work_object.c @@ -14,6 +14,7 @@ #include #include #include +#include #ifdef G_OS_WIN32 # define VC_EXTRALEAN # define WIN32_LEAN_AND_MEAN diff --git a/tagmanager/tm_workspace.c b/tagmanager/tm_workspace.c index 505dcb4a..1cf308bc 100644 --- a/tagmanager/tm_workspace.c +++ b/tagmanager/tm_workspace.c @@ -19,6 +19,7 @@ #ifdef HAVE_GLOB_H # include #endif +#include // handling of P_tmpdir, should be something like /tmp, take the root directory under Win32, // and assume /tmp on non-Win32 systems where P_tmpdir is not set #ifndef P_tmpdir