This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] cleanup: Wunused - trivial
- From: Aleksandar Ristovski <aristovski at qnx dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 30 Jan 2013 22:26:02 -0500
- Subject: [patch] cleanup: Wunused - trivial
- Newsgroups: gmane.comp.gdb.patches
Hello,
This is removing unused variables and allows compiling with -Wunused.
(This patch groups trivial changes).
Thanks,
Aleksandar Ristovski
QNX Software Systems
ChangeLog:
Aleksandar Ristovski <aristovski@qnx.com>
* charset.c (intermediate_encoding): Remove unused I.
* completer.c (signal_completer): Remove unused I.
* continuations.c (discard_my_continuations_1): Remove unused
CONTINUATION_PTR.
* corelow.c (core_close): Remove unused NAME.
(get_core_siginfo): Remove unused PID.
* cp-namespace.c (cp_lookup_symbol_imports_or_template):
Remove unused
I, CPS.
* dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove unused
BASE_OFFSET.
(loclist_describe_location): Remove unused FIRST.
* event-top.c (command_line_handler): Remove unused GOT_EOF.
* exec.c (exec_close_1): Remove unused NEED_SYMTAB_CLEANUP.
(resize_section_table): Remove unused OLD_VALUE.
* gdb_bfd.c (gdb_bfd_map_section): Remove unused HEADER.
* gnu-v3-abi.c (compute_vtable_size): Remove unused ADDR.
* i386-tdep.c (i386_process_record): Remove unused REX.
* infcmd.c (get_return_value): Remove unused UIOUT.
* jv-lang.c (type_from_class): Remove unused IS_ARRAY.
* jv-valprint.c (java_val_print): Remove unused I.
* linux-nat.c (linux_nat_stop_lwp): Remove unused PTID.
* linux-thread-db.c (thread_db_find_new_threads_2): Remove
unused PID.
* m2-typeprint.c (m2_print_type): Remove unused CODE.
* macroexp.c (get_character_constant): Remove unused BODY_START.
(macro_stringify): Remove unused RESULT.
* objc-lang.c (find_methods): Remove unused GDBARCH.
* objfiles.c (filter_overlapping_sections): Remove unused
ABFD1, ABFD2.
* regcache.c (regcache_cooked_read): Remove unused GDBARCH.
* stack.c (print_frame_args): Remove unused SUMMARY.
* thread.c (thread_apply_command): Remove unused P.
* valarith.c (value_x_unop): Remove unused MANGLE_PTR.
* valops.c (search_struct_method): Remove unused SKIP.
* valprint.c (generic_val_print): Remove unused BYTE_ORDER.
* varobj.c (varobj_update): Remove unused CHANGED.
* cli/cli-cmds.c (complete_command): Remove unused NEXT_ITEM.
(alias_command): Remove unused C.
* mi/mi-cmd-catch.c (mi_catch_load_unload): Remove unused C.
* mi/mi-main.c (mi_cmd_data_write_register_values): Remove unused
FORMAT.
(mi_cmd_data_write_memory): Remove unused WORD_FORMAT.
(mi_cmd_data_write_memory_bytes): Remove unused R.
* python/py-gdb-readline.c (gdbpy_readline_wrapper): Remove unused
P_START, P_END.
* python/python.c (_initialize_python): Remove unused
CMD_NAME, CMD.
* tui/tui-disasm.c (tui_set_disassem_content): Remove unused
LINE_WIDTH.
Index: gdb/charset.c
===================================================================
RCS file: /cvs/src/src/gdb/charset.c,v
retrieving revision 1.52
diff -u -p -r1.52 charset.c
--- gdb/charset.c 1 Jan 2013 06:32:40 -0000 1.52
+++ gdb/charset.c 30 Jan 2013 22:25:14 -0000
@@ -965,7 +965,6 @@ intermediate_encoding (void)
iconv_t desc;
static const char *stored_result = NULL;
char *result;
- int i;
if (stored_result)
return stored_result;
Index: gdb/completer.c
===================================================================
RCS file: /cvs/src/src/gdb/completer.c,v
retrieving revision 1.54
diff -u -p -r1.54 completer.c
--- gdb/completer.c 1 Jan 2013 06:32:40 -0000 1.54
+++ gdb/completer.c 30 Jan 2013 22:25:14 -0000
@@ -787,7 +787,6 @@ VEC (char_ptr) *
signal_completer (struct cmd_list_element *ignore,
char *text, char *word)
{
- int i;
VEC (char_ptr) *return_val = NULL;
size_t len = strlen (word);
enum gdb_signal signum;
Index: gdb/continuations.c
===================================================================
RCS file: /cvs/src/src/gdb/continuations.c,v
retrieving revision 1.7
diff -u -p -r1.7 continuations.c
--- gdb/continuations.c 1 Jan 2013 06:32:40 -0000 1.7
+++ gdb/continuations.c 30 Jan 2013 22:25:14 -0000
@@ -100,8 +100,6 @@ discard_my_continuations_1 (struct conti
static void
discard_my_continuations (struct continuation **list)
{
- struct continuation *continuation_ptr = *list;
-
discard_my_continuations_1 (list);
*list = NULL;
}
Index: gdb/corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.126
diff -u -p -r1.126 corelow.c
--- gdb/corelow.c 1 Jan 2013 06:32:40 -0000 1.126
+++ gdb/corelow.c 30 Jan 2013 22:25:14 -0000
@@ -194,8 +194,6 @@ gdb_check_format (bfd *abfd)
static void
core_close (int quitting)
{
- char *name;
-
if (core_bfd)
{
int pid = ptid_get_pid (inferior_ptid);
@@ -664,6 +662,5 @@ static LONGEST
get_core_siginfo (bfd *abfd, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
{
asection *section;
- long pid;
char *section_name;
const char *name = ".note.linuxcore.siginfo";
Index: gdb/cp-namespace.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-namespace.c,v
retrieving revision 1.64
diff -u -p -r1.64 cp-namespace.c
--- gdb/cp-namespace.c 25 Jan 2013 17:55:24 -0000 1.64
+++ gdb/cp-namespace.c 30 Jan 2013 22:25:14 -0000
@@ -451,10 +451,6 @@ cp_lookup_symbol_imports_or_template (co
if (function != NULL && SYMBOL_LANGUAGE (function) == language_cplus)
{
- int i;
- struct cplus_specific *cps
- = function->ginfo.language_specific.cplus_specific;
-
/* Search the function's template parameters. */
if (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION (function))
{
Index: gdb/dwarf2loc.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
retrieving revision 1.163
diff -u -p -r1.163 dwarf2loc.c
--- gdb/dwarf2loc.c 28 Jan 2013 18:02:47 -0000 1.163
+++ gdb/dwarf2loc.c 30 Jan 2013 22:25:15 -0000
@@ -2865,7 +2865,6 @@ dwarf2_compile_expr_to_ax (struct agent_
size_t datalen;
struct block *b;
struct symbol *framefunc;
- LONGEST base_offset = 0;
b = block_for_pc (expr->scope);
@@ -4051,7 +4050,6 @@ loclist_describe_location (struct symbol
{
struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
const gdb_byte *loc_ptr, *buf_end;
- int first = 1;
struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
struct gdbarch *gdbarch = get_objfile_arch (objfile);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
Index: gdb/event-top.c
===================================================================
RCS file: /cvs/src/src/gdb/event-top.c,v
retrieving revision 1.91
diff -u -p -r1.91 event-top.c
--- gdb/event-top.c 22 Jan 2013 20:17:10 -0000 1.91
+++ gdb/event-top.c 30 Jan 2013 22:25:15 -0000
@@ -453,8 +453,6 @@ command_line_handler (char *rl)
char *p;
char *p1;
char *nline;
- char got_eof = 0;
-
int repeat = (instream == stdin);
if (annotation_level > 1 && instream == stdin)
@@ -499,7 +497,6 @@ command_line_handler (char *rl)
and exit from gdb. */
if (!rl || rl == (char *) EOF)
{
- got_eof = 1;
command_handler (0);
return; /* Lint. */
}
Index: gdb/exec.c
===================================================================
RCS file: /cvs/src/src/gdb/exec.c,v
retrieving revision 1.121
diff -u -p -r1.121 exec.c
--- gdb/exec.c 1 Jan 2013 06:32:42 -0000 1.121
+++ gdb/exec.c 30 Jan 2013 22:25:15 -0000
@@ -117,7 +117,6 @@ exec_close (void)
static void
exec_close_1 (int quitting)
{
- int need_symtab_cleanup = 0;
struct vmap *vp, *nxt;
using_exec_ops = 0;
@@ -128,10 +127,7 @@ exec_close_1 (int quitting)
nxt = vp->nxt;
if (vp->objfile)
- {
- free_objfile (vp->objfile);
- need_symtab_cleanup = 1;
- }
+ free_objfile (vp->objfile);
gdb_bfd_unref (vp->bfd);
@@ -391,11 +387,9 @@ add_to_section_table (bfd *abfd, struct
int
resize_section_table (struct target_section_table *table, int num_added)
{
- struct target_section *old_value;
int old_count;
int new_count;
- old_value = table->sections;
old_count = table->sections_end - table->sections;
new_count = num_added + old_count;
Index: gdb/gdb_bfd.c
===================================================================
RCS file: /cvs/src/src/gdb/gdb_bfd.c,v
retrieving revision 1.15
diff -u -p -r1.15 gdb_bfd.c
--- gdb/gdb_bfd.c 1 Jan 2013 06:32:42 -0000 1.15
+++ gdb/gdb_bfd.c 30 Jan 2013 22:25:15 -0000
@@ -345,7 +345,6 @@ const gdb_byte *
gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
{
bfd *abfd;
- unsigned char header[4];
struct gdb_bfd_section_data *descriptor;
bfd_byte *data;
Index: gdb/gnu-v3-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-v3-abi.c,v
retrieving revision 1.79
diff -u -p -r1.79 gnu-v3-abi.c
--- gdb/gnu-v3-abi.c 21 Jan 2013 17:29:39 -0000 1.79
+++ gdb/gnu-v3-abi.c 30 Jan 2013 22:25:15 -0000
@@ -805,7 +805,6 @@ compute_vtable_size (htab_t offset_hash,
struct type *type = check_typedef (value_type (value));
void **slot;
struct value_and_voffset search_vo, *current_vo;
- CORE_ADDR addr = value_address (value) + value_embedded_offset (value);
/* If the object is not dynamic, then we are done; as it cannot have
dynamic base types either. */
Index: gdb/i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.367
diff -u -p -r1.367 i386-tdep.c
--- gdb/i386-tdep.c 1 Jan 2013 06:32:45 -0000 1.367
+++ gdb/i386-tdep.c 30 Jan 2013 22:25:15 -0000
@@ -4339,7 +4339,6 @@ i386_process_record (struct gdbarch *gdb
gdb_byte buf[MAX_REGISTER_SIZE];
struct i386_record_s ir;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- int rex = 0;
uint8_t rex_w = -1;
uint8_t rex_r = 0;
@@ -4419,7 +4418,6 @@ i386_process_record (struct gdbarch *gdb
if (ir.regmap[X86_RECORD_R8_REGNUM]) /* 64 bit target */
{
/* REX */
- rex = 1;
rex_w = (opcode8 >> 3) & 1;
rex_r = (opcode8 & 0x4) << 1;
ir.rex_x = (opcode8 & 0x2) << 2;
Index: gdb/infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.321
diff -u -p -r1.321 infcmd.c
--- gdb/infcmd.c 16 Jan 2013 14:44:03 -0000 1.321
+++ gdb/infcmd.c 30 Jan 2013 22:25:15 -0000
@@ -1450,7 +1450,6 @@ get_return_value (struct value *function
struct regcache *stop_regs = stop_registers;
struct gdbarch *gdbarch;
struct value *value;
- struct ui_out *uiout = current_uiout;
struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
/* If stop_registers were not saved, use the current registers. */
Index: gdb/jv-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-lang.c,v
retrieving revision 1.105
diff -u -p -r1.105 jv-lang.c
--- gdb/jv-lang.c 1 Jan 2013 06:32:46 -0000 1.105
+++ gdb/jv-lang.c 30 Jan 2013 22:25:15 -0000
@@ -269,7 +269,6 @@ type_from_class (struct gdbarch *gdbarch
struct value *utf8_name;
char *nptr;
CORE_ADDR addr;
- int is_array = 0;
type = check_typedef (value_type (clas));
if (TYPE_CODE (type) == TYPE_CODE_PTR)
@@ -318,7 +317,6 @@ type_from_class (struct gdbarch *gdbarch
name = obstack_alloc (&objfile->objfile_obstack, namelen + 1);
java_demangled_signature_copy (name, signature);
name[namelen] = '\0';
- is_array = 1;
temp = clas;
/* Set array element type. */
temp = value_struct_elt (&temp, NULL, "methods", NULL, "structure");
Index: gdb/jv-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-valprint.c,v
retrieving revision 1.65
diff -u -p -r1.65 jv-valprint.c
--- gdb/jv-valprint.c 7 Jan 2013 16:40:36 -0000 1.65
+++ gdb/jv-valprint.c 30 Jan 2013 22:25:15 -0000
@@ -471,7 +471,6 @@ java_val_print (struct type *type, const
const struct value_print_options *options)
{
struct gdbarch *gdbarch = get_type_arch (type);
- unsigned int i = 0; /* Number of characters printed. */
struct type *target_type;
CORE_ADDR addr;
Index: gdb/linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-nat.c,v
retrieving revision 1.262
diff -u -p -r1.262 linux-nat.c
--- gdb/linux-nat.c 1 Jan 2013 06:32:46 -0000 1.262
+++ gdb/linux-nat.c 30 Jan 2013 22:25:15 -0000
@@ -4976,8 +4976,6 @@ linux_nat_stop_lwp (struct lwp_info *lwp
{
if (!lwp->stopped)
{
- ptid_t ptid = lwp->ptid;
-
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LNSL: running -> suspending %s\n",
Index: gdb/linux-thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-thread-db.c,v
retrieving revision 1.109
diff -u -p -r1.109 linux-thread-db.c
--- gdb/linux-thread-db.c 1 Jan 2013 06:32:46 -0000 1.109
+++ gdb/linux-thread-db.c 30 Jan 2013 22:25:15 -0000
@@ -1661,7 +1661,6 @@ thread_db_find_new_threads_2 (ptid_t pti
{
td_err_e err = TD_OK;
struct thread_db_info *info;
- int pid = ptid_get_pid (ptid);
int i, loop;
info = get_thread_db_info (GET_PID (ptid));
Index: gdb/m2-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/m2-typeprint.c,v
retrieving revision 1.33
diff -u -p -r1.33 m2-typeprint.c
--- gdb/m2-typeprint.c 1 Jan 2013 06:32:46 -0000 1.33
+++ gdb/m2-typeprint.c 30 Jan 2013 22:25:15 -0000
@@ -77,8 +77,6 @@ m2_print_type (struct type *type, const
int show, int level,
const struct type_print_options *flags)
{
- enum type_code code;
-
CHECK_TYPEDEF (type);
QUIT;
@@ -90,7 +88,6 @@ m2_print_type (struct type *type, const
return;
}
- code = TYPE_CODE (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_SET:
Index: gdb/macroexp.c
===================================================================
RCS file: /cvs/src/src/gdb/macroexp.c,v
retrieving revision 1.31
diff -u -p -r1.31 macroexp.c
--- gdb/macroexp.c 1 Jan 2013 06:32:47 -0000 1.31
+++ gdb/macroexp.c 30 Jan 2013 22:25:15 -0000
@@ -337,7 +337,6 @@ get_character_constant (struct macro_buf
&& p[1] == '\''))
{
char *tok_start = p;
- char *body_start;
int char_count = 0;
if (*p == '\'')
@@ -347,7 +346,6 @@ get_character_constant (struct macro_buf
else
gdb_assert_not_reached ("unexpected character constant");
- body_start = p;
for (;;)
{
if (p >= end)
@@ -700,7 +698,6 @@ macro_stringify (const char *str)
{
struct macro_buffer buffer;
int len = strlen (str);
- char *result;
init_buffer (&buffer, len);
stringify (&buffer, str, len);
Index: gdb/objc-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/objc-lang.c,v
retrieving revision 1.111
diff -u -p -r1.111 objc-lang.c
--- gdb/objc-lang.c 7 Jan 2013 16:51:47 -0000 1.111
+++ gdb/objc-lang.c 30 Jan 2013 22:25:15 -0000
@@ -996,8 +996,6 @@ find_methods (char type, const char *cla
ALL_OBJFILE_MSYMBOLS (objfile, msymbol)
{
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
-
QUIT;
/* Check the symbol name first as this can be done entirely without
Index: gdb/objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.153
diff -u -p -r1.153 objfiles.c
--- gdb/objfiles.c 2 Jan 2013 18:52:07 -0000 1.153
+++ gdb/objfiles.c 30 Jan 2013 22:25:15 -0000
@@ -1234,9 +1234,6 @@ filter_overlapping_sections (struct obj_
struct objfile *const objf1 = sect1->objfile;
struct objfile *const objf2 = sect2->objfile;
- const struct bfd *const abfd1 = objf1->obfd;
- const struct bfd *const abfd2 = objf2->obfd;
-
const struct bfd_section *const bfds1 = sect1->the_bfd_section;
const struct bfd_section *const bfds2 = sect2->the_bfd_section;
Index: gdb/regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.198
diff -u -p -r1.198 regcache.c
--- gdb/regcache.c 1 Jan 2013 06:32:49 -0000 1.198
+++ gdb/regcache.c 30 Jan 2013 22:25:15 -0000
@@ -706,8 +706,6 @@ regcache_cooked_read (struct regcache *r
{
/* Read-only register cache, perhaps the cooked value was
cached? */
- struct gdbarch *gdbarch = regcache->descr->gdbarch;
-
if (regcache->register_status[regnum] == REG_VALID)
memcpy (buf, register_buffer (regcache, regnum),
regcache->descr->sizeof_register[regnum]);
Index: gdb/stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.261
diff -u -p -r1.261 stack.c
--- gdb/stack.c 1 Jan 2013 06:32:51 -0000 1.261
+++ gdb/stack.c 30 Jan 2013 22:25:15 -0000
@@ -504,8 +504,6 @@ print_frame_args (struct symbol *func, s
struct ui_file *stb;
/* True if we should print arguments, false otherwise. */
int print_args = strcmp (print_frame_arguments, "none");
- /* True in "summary" mode, false otherwise. */
- int summary = !strcmp (print_frame_arguments, "scalars");
stb = mem_fileopen ();
old_chain = make_cleanup_ui_file_delete (stb);
Index: gdb/thread.c
===================================================================
RCS file: /cvs/src/src/gdb/thread.c,v
retrieving revision 1.150
diff -u -p -r1.150 thread.c
--- gdb/thread.c 1 Jan 2013 06:41:28 -0000 1.150
+++ gdb/thread.c 30 Jan 2013 22:25:16 -0000
@@ -1233,7 +1233,6 @@ thread_apply_command (char *tidlist, int
{
struct thread_info *tp;
int start;
- char *p = tidlist;
start = get_number_or_range (&state);
Index: gdb/valarith.c
===================================================================
RCS file: /cvs/src/src/gdb/valarith.c,v
retrieving revision 1.109
diff -u -p -r1.109 valarith.c
--- gdb/valarith.c 25 Jan 2013 22:31:43 -0000 1.109
+++ gdb/valarith.c 30 Jan 2013 22:25:16 -0000
@@ -510,7 +510,7 @@ value_x_unop (struct value *arg1, enum e
{
struct gdbarch *gdbarch = get_type_arch (value_type (arg1));
struct value **argvec;
- char *ptr, *mangle_ptr;
+ char *ptr;
char tstr[13], mangle_tstr[13];
int static_memfuncp, nargs;
@@ -532,7 +532,6 @@ value_x_unop (struct value *arg1, enum e
strcpy (tstr, "operator__");
ptr = tstr + 8;
strcpy (mangle_tstr, "__");
- mangle_ptr = mangle_tstr + 2;
switch (op)
{
case UNOP_PREINCREMENT:
Index: gdb/valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.310
diff -u -p -r1.310 valops.c
--- gdb/valops.c 25 Jan 2013 22:31:43 -0000 1.310
+++ gdb/valops.c 30 Jan 2013 22:25:16 -0000
@@ -2236,7 +2236,6 @@ search_struct_method (const char *name,
for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
{
int base_offset;
- int skip = 0;
int this_offset;
if (BASETYPE_VIA_VIRTUAL (type, i))
Index: gdb/valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/valprint.c,v
retrieving revision 1.133
diff -u -p -r1.133 valprint.c
--- gdb/valprint.c 7 Jan 2013 16:40:36 -0000 1.133
+++ gdb/valprint.c 30 Jan 2013 22:25:16 -0000
@@ -370,7 +370,6 @@ generic_val_print (struct type *type, co
const struct generic_val_print_decorations *decorations)
{
struct gdbarch *gdbarch = get_type_arch (type);
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned int i = 0; /* Number of characters printed. */
unsigned len;
struct type *elttype, *unresolved_elttype;
Index: gdb/varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.203
diff -u -p -r1.203 varobj.c
--- gdb/varobj.c 1 Jan 2013 06:41:29 -0000 1.203
+++ gdb/varobj.c 30 Jan 2013 22:25:16 -0000
@@ -1969,7 +1969,6 @@ varobj_value_has_mutated (struct varobj
VEC(varobj_update_result) *
varobj_update (struct varobj **varp, int explicit)
{
- int changed = 0;
int type_changed = 0;
int i;
struct value *new;
Index: gdb/cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.145
diff -u -p -r1.145 cli-cmds.c
--- gdb/cli/cli-cmds.c 1 Jan 2013 06:32:53 -0000 1.145
+++ gdb/cli/cli-cmds.c 30 Jan 2013 22:25:16 -0000
@@ -285,8 +285,6 @@ complete_command (char *arg, int from_tt
unique item once. */
for (ix = 0; VEC_iterate (char_ptr, completions, ix, item); ++ix)
{
- int next_item;
-
if (prev == NULL || strcmp (item, prev) != 0)
{
printf_unfiltered ("%s%s\n", arg_prefix, item);
@@ -1323,7 +1321,6 @@ alias_command (char *args, int from_tty)
char *args2, *equals, *alias, *command;
char **alias_argv, **command_argv;
dyn_string_t alias_dyn_string, command_dyn_string;
- struct cmd_list_element *c;
static const char usage[] = N_("Usage: alias [-a] [--] ALIAS = COMMAND");
if (args == NULL || strchr (args, '=') == NULL)
Index: gdb/mi/mi-cmd-catch.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmd-catch.c,v
retrieving revision 1.2
diff -u -p -r1.2 mi-cmd-catch.c
--- gdb/mi/mi-cmd-catch.c 1 Jan 2013 06:33:00 -0000 1.2
+++ gdb/mi/mi-cmd-catch.c 30 Jan 2013 22:25:16 -0000
@@ -33,7 +33,6 @@
static void
mi_catch_load_unload (int load, char *argv[], int argc)
{
- struct solib_catchpoint *c;
struct cleanup *back_to;
const char *actual_cmd = load ? "-catch-load" : "-catch-unload";
int temp = 0;
Index: gdb/mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.225
diff -u -p -r1.225 mi-main.c
--- gdb/mi/mi-main.c 1 Jan 2013 06:33:01 -0000 1.225
+++ gdb/mi/mi-main.c 30 Jan 2013 22:25:16 -0000
@@ -1189,7 +1189,6 @@ mi_cmd_data_write_register_values (char
struct regcache *regcache;
struct gdbarch *gdbarch;
int numregs, i;
- char format;
/* Note that the test for a valid register must include checking the
gdbarch_register_name because gdbarch_num_regs may be allocated
@@ -1206,8 +1205,6 @@ mi_cmd_data_write_register_values (char
error (_("-data-write-register-values: Usage: -data-write-register-"
"values <format> [<regnum1> <value1>...<regnumN> <valueN>]"));
- format = (int) argv[0][0];
-
if (!target_has_registers)
error (_("-data-write-register-values: No registers."));
@@ -1588,7 +1585,6 @@ mi_cmd_data_write_memory (char *command,
struct gdbarch *gdbarch = get_current_arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR addr;
- char word_format;
long word_size;
/* FIXME: ezannoni 2000-02-17 LONGEST could possibly not be big
enough when using a compiler other than GCC. */
@@ -1632,9 +1628,6 @@ mi_cmd_data_write_memory (char *command,
/* Extract all the arguments. */
/* Start address of the memory dump. */
addr = parse_and_eval_address (argv[0]);
- /* The format character to use when displaying a memory word. See
- the ``x'' command. */
- word_format = argv[1][0];
/* The size of the memory word. */
word_size = atol (argv[2]);
@@ -1666,7 +1659,7 @@ mi_cmd_data_write_memory_bytes (char *co
char *cdata;
gdb_byte *data;
gdb_byte *databuf;
- size_t len, r, i, steps, remainder;
+ size_t len, i, steps, remainder;
long int count, j;
struct cleanup *back_to;
Index: gdb/python/py-gdb-readline.c
===================================================================
RCS file: /cvs/src/src/gdb/python/py-gdb-readline.c,v
retrieving revision 1.2
diff -u -p -r1.2 py-gdb-readline.c
--- gdb/python/py-gdb-readline.c 1 Jan 2013 06:33:01 -0000 1.2
+++ gdb/python/py-gdb-readline.c 30 Jan 2013 22:25:16 -0000
@@ -37,7 +37,7 @@ gdbpy_readline_wrapper (FILE *sys_stdin,
char *prompt)
{
int n;
- char *p = NULL, *p_start, *p_end, *q;
+ char *p = NULL, *q;
volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ALL)
Index: gdb/python/python.c
===================================================================
RCS file: /cvs/src/src/gdb/python/python.c,v
retrieving revision 1.105
diff -u -p -r1.105 python.c
--- gdb/python/python.c 23 Jan 2013 19:59:11 -0000 1.105
+++ gdb/python/python.c 30 Jan 2013 22:25:16 -0000
@@ -1436,8 +1436,6 @@ extern initialize_file_ftype _initialize
void
_initialize_python (void)
{
- char *cmd_name;
- struct cmd_list_element *cmd;
char *progname;
#ifdef IS_PY3K
int i;
Index: gdb/tui/tui-disasm.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-disasm.c,v
retrieving revision 1.39
diff -u -p -r1.39 tui-disasm.c
--- gdb/tui/tui-disasm.c 1 Jan 2013 06:41:30 -0000 1.39
+++ gdb/tui/tui-disasm.c 30 Jan 2013 22:25:17 -0000
@@ -173,7 +173,7 @@ tui_set_disassem_content (struct gdbarch
enum tui_status ret = TUI_FAILURE;
int i;
int offset = TUI_DISASM_WIN->detail.source_info.horizontal_offset;
- int line_width, max_lines;
+ int max_lines;
CORE_ADDR cur_pc;
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
int tab_len = tui_default_tab_len ();
@@ -203,8 +203,6 @@ tui_set_disassem_content (struct gdbarch
* max_lines);
memset (asm_lines, 0, sizeof (struct tui_asm_line) * max_lines);
- line_width = TUI_DISASM_WIN->generic.width - 1;
-
tui_disassemble (gdbarch, asm_lines, pc, max_lines);
/* See what is the maximum length of an address and of a line. */