Fix some gcc warnings with '-Wall -W -ansi' enabled.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/build-system@4030 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2009-07-27 16:37:23 +00:00
parent 2f207ca919
commit e3b1c92aa8
4 changed files with 95 additions and 92 deletions

View File

@ -1,3 +1,9 @@
2009-07-27 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/build.c, src/build.h, src/project.c:
Fix some gcc warnings with '-Wall -W -ansi' enabled.
2009-07-25 Lex Trotman <elextr(at)gmail(dot)com> 2009-07-25 Lex Trotman <elextr(at)gmail(dot)com>
* src/build.c * src/build.c

View File

@ -113,7 +113,7 @@ static gboolean build_iofunc(GIOChannel *ioc, GIOCondition cond, gpointer data);
#endif #endif
static gboolean build_create_shellscript(const gchar *fname, const gchar *cmd, gboolean autoclose); static gboolean build_create_shellscript(const gchar *fname, const gchar *cmd, gboolean autoclose);
static GPid build_spawn_cmd(GeanyDocument *doc, const gchar *cmd, const gchar *dir); static GPid build_spawn_cmd(GeanyDocument *doc, const gchar *cmd, const gchar *dir);
static void set_stop_button(gboolean stop); /* static void set_stop_button(gboolean stop); */
static void run_exit_cb(GPid child_pid, gint status, gpointer user_data); static void run_exit_cb(GPid child_pid, gint status, gpointer user_data);
static void on_set_build_commands_activate(GtkWidget *w, gpointer u); static void on_set_build_commands_activate(GtkWidget *w, gpointer u);
static void on_build_next_error(GtkWidget *menuitem, gpointer user_data); static void on_build_next_error(GtkWidget *menuitem, gpointer user_data);
@ -1442,9 +1442,10 @@ void build_menu_update(GeanyDocument *doc)
} }
/* Call build_menu_update() instead of calling this directly. */ /* Call build_menu_update() instead of calling this directly. */
#if 0
static void set_stop_button(gboolean stop) static void set_stop_button(gboolean stop)
{ {
/* const gchar *button_stock_id = NULL; const gchar *button_stock_id = NULL;
GtkStockItem sitem; GtkStockItem sitem;
GtkToolButton *run_button; GtkToolButton *run_button;
GtkWidget *menuitem = build_get_menu_items(run_info.file_type_id)->item_exec; GtkWidget *menuitem = build_get_menu_items(run_info.file_type_id)->item_exec;
@ -1459,7 +1460,7 @@ static void set_stop_button(gboolean stop)
return; return;
/* use the run button also as stop button */ /* use the run button also as stop button */
/* if (stop) if (stop)
{ {
if (run_button != NULL) if (run_button != NULL)
gtk_tool_button_set_stock_id(run_button, "gtk-stop"); gtk_tool_button_set_stock_id(run_button, "gtk-stop");
@ -1487,8 +1488,9 @@ static void set_stop_button(gboolean stop)
gtk_label_set_text_with_mnemonic(GTK_LABEL(gtk_bin_get_child(GTK_BIN(menuitem))), gtk_label_set_text_with_mnemonic(GTK_LABEL(gtk_bin_get_child(GTK_BIN(menuitem))),
sitem.label); sitem.label);
} }
}*/
} }
}
#endif
static void on_set_build_commands_activate(GtkWidget *w, gpointer u) static void on_set_build_commands_activate(GtkWidget *w, gpointer u)
{ {
@ -2093,7 +2095,6 @@ void load_build_menu(GKeyFile *config, GeanyBuildSource src, gpointer p)
gchar **ftlist; gchar **ftlist;
gchar *value; gchar *value;
gboolean bvalue; gboolean bvalue;
gint cmd;
if (g_key_file_has_group(config, build_grp_name)) if (g_key_file_has_group(config, build_grp_name))
{ {

View File

@ -143,7 +143,7 @@ GtkWidget *build_commands_table( GeanyDocument *doc, GeanyBuildSource dst, Table
gboolean read_build_commands( BuildDestination *dst, TableData data, gint response ); gboolean read_build_commands( BuildDestination *dst, TableData data, gint response );
void free_build_data( TableData data ); void free_build_fields( TableData data );
void set_build_non_ft_wd_to_proj(TableData table_data); void set_build_non_ft_wd_to_proj(TableData table_data);

View File

@ -338,8 +338,6 @@ static void remove_foreach_project_filetype( gpointer data, gpointer user_data )
/* open_default will make function reload default session files on close */ /* open_default will make function reload default session files on close */
void project_close(gboolean open_default) void project_close(gboolean open_default)
{ {
gint i;
g_return_if_fail(app->project != NULL); g_return_if_fail(app->project != NULL);
ui_set_statusbar(TRUE, _("Project \"%s\" closed."), app->project->name); ui_set_statusbar(TRUE, _("Project \"%s\" closed."), app->project->name);
@ -398,12 +396,10 @@ static void on_set_use_base_path_clicked( GtkWidget *unused1, gpointer user_data
static void create_properties_dialog(PropertyDialogElements *e) static void create_properties_dialog(PropertyDialogElements *e)
{ {
GtkWidget *table, *notebook, *build_table; GtkWidget *table, *notebook, *build_table;
GtkWidget *image;
GtkWidget *button; GtkWidget *button;
GtkWidget *bbox; GtkWidget *bbox;
GtkWidget *label; GtkWidget *label;
GtkWidget *swin; GtkWidget *swin;
gpointer data;
GeanyDocument *doc = document_get_current(); GeanyDocument *doc = document_get_current();
GeanyFiletype *ft; GeanyFiletype *ft;
@ -1111,9 +1107,9 @@ gchar *project_get_base_path(void)
* Maybe in future this will support a separate project make path from base path. */ * Maybe in future this will support a separate project make path from base path. */
gchar *project_get_make_dir(void) gchar *project_get_make_dir(void)
{ {
GeanyProject *project = app->project; /* GeanyProject *project = app->project;
/* if (project && ! project->make_in_base_path) if (project && ! project->make_in_base_path)
return NULL; return NULL;
else*/ else*/
return project_get_base_path(); return project_get_base_path();