Kaydet (Commit) 9f676783 authored tarafından Enrico Tröger's avatar Enrico Tröger

Remove unused variables (patch by Eugene Arshinov, thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5812 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 16fd3e4d
2011-05-22 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/about.c, src/build.c, tagmanager/tm_workspace.c:
Remove unused variables (patch by Eugene Arshinov, thanks).
2011-05-12 Colomban Wendling <colomban(at)geany(dot)org> 2011-05-12 Colomban Wendling <colomban(at)geany(dot)org>
* src/encodings.c: * src/encodings.c:
......
...@@ -137,7 +137,6 @@ static GtkWidget *create_dialog(void) ...@@ -137,7 +137,6 @@ static GtkWidget *create_dialog(void)
GtkWidget *table; GtkWidget *table;
GtkWidget *license_scrollwin; GtkWidget *license_scrollwin;
GtkWidget *info_box; GtkWidget *info_box;
GtkWidget *button;
GtkWidget *header_hbox; GtkWidget *header_hbox;
GtkWidget *header_eventbox; GtkWidget *header_eventbox;
GdkPixbuf *icon; GdkPixbuf *icon;
...@@ -154,7 +153,7 @@ static GtkWidget *create_dialog(void) ...@@ -154,7 +153,7 @@ static GtkWidget *create_dialog(void)
gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_set_title(GTK_WINDOW(dialog), _("About Geany")); gtk_window_set_title(GTK_WINDOW(dialog), _("About Geany"));
gtk_widget_set_name(dialog, "GeanyDialog"); gtk_widget_set_name(dialog, "GeanyDialog");
button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
g_signal_connect(dialog, "key-press-event", G_CALLBACK(gb_on_key_pressed), NULL); g_signal_connect(dialog, "key-press-event", G_CALLBACK(gb_on_key_pressed), NULL);
......
...@@ -1654,11 +1654,8 @@ static void on_toolbutton_build_activate(GtkWidget *menuitem, gpointer user_data ...@@ -1654,11 +1654,8 @@ static void on_toolbutton_build_activate(GtkWidget *menuitem, gpointer user_data
static void on_toolbutton_make_activate(GtkWidget *menuitem, gpointer user_data) static void on_toolbutton_make_activate(GtkWidget *menuitem, gpointer user_data)
{ {
gchar *msg; gchar *msg;
gint grp, cmd;
last_toolbutton_action = user_data; last_toolbutton_action = user_data;
grp = GPOINTER_TO_GRP(user_data);
cmd = GPOINTER_TO_CMD(user_data);
if (last_toolbutton_action == GBO_TO_POINTER(GEANY_GBO_MAKE_ALL)) if (last_toolbutton_action == GBO_TO_POINTER(GEANY_GBO_MAKE_ALL))
msg = _("Build the current file with Make and the default target"); msg = _("Build the current file with Make and the default target");
else if (last_toolbutton_action == GBO_TO_POINTER(GEANY_GBO_CUSTOM)) else if (last_toolbutton_action == GBO_TO_POINTER(GEANY_GBO_CUSTOM))
...@@ -2116,11 +2113,8 @@ static gboolean read_row(BuildDestination *dst, BuildTableData table_data, gint ...@@ -2116,11 +2113,8 @@ static gboolean read_row(BuildDestination *dst, BuildTableData table_data, gint
{ {
gchar *entries[GEANY_BC_CMDENTRIES_COUNT]; gchar *entries[GEANY_BC_CMDENTRIES_COUNT];
gboolean changed = FALSE; gboolean changed = FALSE;
GeanyBuildSource src;
enum GeanyBuildCmdEntries i; enum GeanyBuildCmdEntries i;
src = table_data->rows[drow]->src;
for (i = 0; i < GEANY_BC_CMDENTRIES_COUNT; i++) for (i = 0; i < GEANY_BC_CMDENTRIES_COUNT; i++)
{ {
entries[i] = g_strdup(get_build_command_entry_text(table_data->rows[drow]->entries[i])); entries[i] = g_strdup(get_build_command_entry_text(table_data->rows[drow]->entries[i]));
......
...@@ -223,11 +223,10 @@ static void write_includes_file(FILE *fp, GList *includes_files) ...@@ -223,11 +223,10 @@ static void write_includes_file(FILE *fp, GList *includes_files)
{ {
char *str = g_strdup_printf("#include \"%s\"\n", (char*)node->data); char *str = g_strdup_printf("#include \"%s\"\n", (char*)node->data);
int str_len = strlen(str); int str_len = strlen(str);
size_t size;
size = fwrite(str, str_len, 1, fp); fwrite(str, str_len, 1, fp);
g_free(str); g_free(str);
node = g_list_next (node); node = g_list_next(node);
} }
} }
...@@ -251,9 +250,8 @@ static void append_to_temp_file(FILE *fp, GList *file_list) ...@@ -251,9 +250,8 @@ static void append_to_temp_file(FILE *fp, GList *file_list)
} }
else else
{ {
size_t size; fwrite(contents, length, 1, fp);
size = fwrite(contents, length, 1, fp); fwrite("\n", 1, 1, fp); /* in case file doesn't end in newline (e.g. windows). */
size = fwrite("\n", 1, 1, fp); /* in case file doesn't end in newline (e.g. windows). */
g_free(contents); g_free(contents);
} }
node = g_list_next (node); node = g_list_next (node);
...@@ -376,13 +374,12 @@ gboolean tm_workspace_create_global_tags(const char *config_dir, const char *pre ...@@ -376,13 +374,12 @@ gboolean tm_workspace_create_global_tags(const char *config_dir, const char *pre
*/ */
if (pre_process != NULL) if (pre_process != NULL)
{ {
int ret;
command = g_strdup_printf("%s %s | grep -v -E '^\\s*(G_BEGIN_DECLS|G_END_DECLS)\\s*$' > %s", command = g_strdup_printf("%s %s | grep -v -E '^\\s*(G_BEGIN_DECLS|G_END_DECLS)\\s*$' > %s",
pre_process, temp_file, temp_file2); pre_process, temp_file, temp_file2);
#ifdef TM_DEBUG #ifdef TM_DEBUG
g_message("Executing: %s", command); g_message("Executing: %s", command);
#endif #endif
ret = system(command); system(command);
g_free(command); g_free(command);
g_unlink(temp_file); g_unlink(temp_file);
g_free(temp_file); g_free(temp_file);
......
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