Fix warning with -Wall -Wextra.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/build-system@3175 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2008-11-05 16:18:52 +00:00
parent bccb2592a7
commit 20da51a418
2 changed files with 23 additions and 15 deletions

View File

@ -1,33 +1,39 @@
2008-11-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/build.c:
Fix warning with -Wall -Wextra.
2008-111-01 Lex Trotman <elextr(at)gmail(dot)com> 2008-111-01 Lex Trotman <elextr(at)gmail(dot)com>
Updated Manual to build geany.html Updated Manual to build geany.html
* doc/geany.txt: * doc/geany.txt:
Modified to make geany.html build w/o errors Modified to make geany.html build w/o errors
2008-10-27 Lex Trotman <elextr(at)gmail(dot)com> 2008-10-27 Lex Trotman <elextr(at)gmail(dot)com>
Updated Manual to reflect desired full functionality of build system Updated Manual to reflect desired full functionality of build system
* doc/geany.txt: * doc/geany.txt:
Build system section heavily re-written, minor changes to preferences Build system section heavily re-written, minor changes to preferences
and project sections, NOT DONE file formats section until fully and project sections, NOT DONE file formats section until fully
implemented. implemented.
* doc/images/build_menu.png, doc/images/build_menu_cmds.png * doc/images/build_menu.png, doc/images/build_menu_cmds.png
added images for document added images for document
2008-10-17 Lex Trotman <elextr(at)gmail(dot)com> 2008-10-17 Lex Trotman <elextr(at)gmail(dot)com>
Prototype of project customisable build menu commands Prototype of project customisable build menu commands
* src/build.h: * src/build.h:
added build_default_menu() to interface, used by projects added build_default_menu() to interface, used by projects
* src/build.c: * src/build.c:
build_make_file() changed to take commands from project or default build_make_file() changed to take commands from project or default
create_build_menu_gen() changed to create the menu from the project create_build_menu_gen() changed to create the menu from the project
settings or default & unref old menu so callable more than once settings or default & unref old menu so callable more than once
build_default_menu() added build_default_menu() added
on_includes_arguments_dialog_response() added getting the values for on_includes_arguments_dialog_response() added getting the values for
the project fields the project fields
show_includes_arguments_gen() added the extra fields for project commands show_includes_arguments_gen() added the extra fields for project commands
* src/project.h: * src/project.h:

View File

@ -289,6 +289,7 @@ static GPid build_view_tex_file(GeanyDocument *doc, gint mode)
} }
#if 0
/* get curfile.o in locale encoding from document::file_name */ /* get curfile.o in locale encoding from document::file_name */
static gchar *get_object_filename(GeanyDocument *doc) static gchar *get_object_filename(GeanyDocument *doc)
{ {
@ -309,6 +310,7 @@ static gchar *get_object_filename(GeanyDocument *doc)
return object_file; return object_file;
} }
#endif
static GPid build_make_file(GeanyDocument *doc, gint build_opts) static GPid build_make_file(GeanyDocument *doc, gint build_opts)
@ -323,7 +325,7 @@ static GPid build_make_file(GeanyDocument *doc, gint build_opts)
return (GPid) 1; return (GPid) 1;
part1 = tool_prefs.make_cmd; part1 = tool_prefs.make_cmd;
if (build_opts == GBO_MAKE_OBJECT) if (build_opts == GBO_MAKE_OBJECT)
{ {
build_info.type = build_opts; build_info.type = build_opts;
@ -347,7 +349,7 @@ static GPid build_make_file(GeanyDocument *doc, gint build_opts)
else part2 = "all"; else part2 = "all";
dir = project_get_make_dir(); dir = project_get_make_dir();
} }
cmdstr = g_string_new(part1); cmdstr = g_string_new(part1);
if( part2!=NULL ) if( part2!=NULL )
{ {
@ -1547,7 +1549,7 @@ on_includes_arguments_dialog_response (GtkDialog *dialog,
if( app->project!=NULL ) if( app->project!=NULL )
{ {
struct GeanyProject *proj = app->project; struct GeanyProject *proj = app->project;
newstr = gtk_entry_get_text( GTK_ENTRY( lookup_widget( GTK_WIDGET(dialog), "build_1_label" ) ) ); newstr = gtk_entry_get_text( GTK_ENTRY( lookup_widget( GTK_WIDGET(dialog), "build_1_label" ) ) );
if( !utils_str_equal( newstr, proj->build_1_label ) ) if( !utils_str_equal( newstr, proj->build_1_label ) )
{ {
@ -1698,14 +1700,14 @@ static void show_includes_arguments_gen(void)
} }
/* see if need project based command fields */ /* see if need project based command fields */
if( app->project!=NULL ) if( app->project!=NULL )
{ {
GtkWidget *align, *frame; GtkWidget *align, *frame;
/* in-dialog heading for the project part of the build commands dialog */ /* in-dialog heading for the project part of the build commands dialog */
gchar *frame_title = g_strdup_printf(_("%s build menu commands"), "project"); gchar *frame_title = g_strdup_printf(_("%s build menu commands"), "project");
struct GeanyProject *proj = app->project; struct GeanyProject *proj = app->project;
frame = ui_frame_new_with_alignment(frame_title, &align); frame = ui_frame_new_with_alignment(frame_title, &align);
gtk_container_add(GTK_CONTAINER(vbox), frame); gtk_container_add(GTK_CONTAINER(vbox), frame);
g_free(frame_title); g_free(frame_title);
@ -1713,7 +1715,7 @@ static void show_includes_arguments_gen(void)
pr_table = gtk_table_new(3, 3, FALSE); pr_table = gtk_table_new(3, 3, FALSE);
gtk_table_set_row_spacings(GTK_TABLE(pr_table), 6); gtk_table_set_row_spacings(GTK_TABLE(pr_table), 6);
gtk_container_add(GTK_CONTAINER(align), pr_table); gtk_container_add(GTK_CONTAINER(align), pr_table);
/* label and cmd 1 */ /* label and cmd 1 */
build_entry = gtk_entry_new(); build_entry = gtk_entry_new();
gtk_entry_set_width_chars( GTK_ENTRY(build_entry), 10 ); gtk_entry_set_width_chars( GTK_ENTRY(build_entry), 10 );
@ -1773,9 +1775,9 @@ static void show_includes_arguments_gen(void)
gtk_table_attach_defaults( GTK_TABLE(pr_table), build_entry, 1, 3, 2, 3 ); gtk_table_attach_defaults( GTK_TABLE(pr_table), build_entry, 1, 3, 2, 3 );
g_object_set_data_full(G_OBJECT(dialog), "build_3_cmd", g_object_set_data_full(G_OBJECT(dialog), "build_3_cmd",
gtk_widget_ref(build_entry), (GDestroyNotify)gtk_widget_unref); gtk_widget_ref(build_entry), (GDestroyNotify)gtk_widget_unref);
} }
label = gtk_label_new(_("%f will be replaced by the current filename, e.g. test_file.c\n" label = gtk_label_new(_("%f will be replaced by the current filename, e.g. test_file.c\n"
"%e will be replaced by the filename without extension, e.g. test_file")); "%e will be replaced by the filename without extension, e.g. test_file"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);