This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[ob] cli-dump, cli-decode, cli-cmds, cli-script.c, eliminate unused variables
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 05 May 2010 14:33:12 -0700
- Subject: [ob] cli-dump, cli-decode, cli-cmds, cli-script.c, eliminate unused variables
2010-05-05 Michael Snyder <msnyder@vmware.com>
* cli-dump.c (dump_memory_to_file): Delete unused variable.
(restore_binary_file): Delete unused variable.
* cli-decode.c (deprecated_cmd_warning): Delete unused variables.
* cli-script.c (define_command): Delete unused variables.
(recurse_read_control_structure): Delete unused variable.
(script_from_file): Delete unused variable.
* cli-cmds.c (complete_command): Delete unused variable.
(disassemble_command): Delete unused variable.
Index: cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.102
diff -u -p -r1.102 cli-cmds.c
--- cli/cli-cmds.c 23 Apr 2010 16:20:09 -0000 1.102
+++ cli/cli-cmds.c 5 May 2010 21:31:59 -0000
@@ -255,7 +255,6 @@ compare_strings (const void *arg1, const
static void
complete_command (char *arg, int from_tty)
{
- int i;
int argpoint;
char **completions, *point, *arg_prefix;
@@ -1117,7 +1116,7 @@ disassemble_command (char *arg, int from
struct gdbarch *gdbarch = get_current_arch ();
CORE_ADDR low, high;
char *name;
- CORE_ADDR pc, pc_masked;
+ CORE_ADDR pc;
int flags;
name = NULL;
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.87
diff -u -p -r1.87 cli-decode.c
--- cli/cli-decode.c 26 Apr 2010 18:37:13 -0000 1.87
+++ cli/cli-decode.c 5 May 2010 21:31:59 -0000
@@ -1422,8 +1422,6 @@ deprecated_cmd_warning (char **text)
struct cmd_list_element *alias = NULL;
struct cmd_list_element *prefix_cmd = NULL;
struct cmd_list_element *cmd = NULL;
- struct cmd_list_element *c;
- char *type;
if (!lookup_cmd_composition (*text, &alias, &prefix_cmd, &cmd))
/* return if text doesn't evaluate to a command */
Index: cli/cli-dump.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-dump.c,v
retrieving revision 1.35
diff -u -p -r1.35 cli-dump.c
--- cli/cli-dump.c 1 Jan 2010 07:31:47 -0000 1.35
+++ cli/cli-dump.c 5 May 2010 21:31:59 -0000
@@ -223,7 +223,6 @@ dump_memory_to_file (char *cmd, char *mo
void *buf;
char *lo_exp;
char *hi_exp;
- int len;
/* Open the file. */
filename = scan_filename_with_cleanup (&cmd, NULL);
@@ -513,7 +512,6 @@ static void
restore_binary_file (char *filename, struct callback_data *data)
{
FILE *file = fopen_with_cleanup (filename, FOPEN_RB);
- int status;
gdb_byte *buf;
long len;
Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.61
diff -u -p -r1.61 cli-script.c
--- cli/cli-script.c 7 Apr 2010 16:54:39 -0000 1.61
+++ cli/cli-script.c 5 May 2010 21:31:59 -0000
@@ -1047,7 +1047,6 @@ recurse_read_control_structure (char * (
enum misc_command_type val;
enum command_control_type ret;
struct command_line **body_ptr, *child_tail, *next;
- char *p;
child_tail = NULL;
current_body = 1;
@@ -1408,8 +1407,8 @@ define_command (char *comname, int from_
CMD_POST_HOOK
};
struct command_line *cmds;
- struct cmd_list_element *c, *newc, *oldc, *hookc = 0, **list;
- char *tem, *tem2, *comfull;
+ struct cmd_list_element *c, *newc, *hookc = 0, **list;
+ char *tem, *comfull;
char tmpbuf[MAX_TMPBUF];
int hook_type = CMD_NO_HOOK;
int hook_name_size = 0;
@@ -1588,7 +1587,6 @@ script_from_file (FILE *stream, const ch
{
struct cleanup *old_cleanups;
struct source_cleanup_lines_args old_lines;
- int needed_length;
if (stream == NULL)
internal_error (__FILE__, __LINE__, _("called with NULL file pointer!"));