This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] *-typeprint.c, *-valprint.c: remove unused variables
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 06 May 2010 17:29:55 -0700
- Subject: [patch] *-typeprint.c, *-valprint.c: remove unused variables
2010-05-06 Michael Snyder <msnyder@vmware.com>
* p-typeprint.c (pascal_type_print_base): Delete unused variable.
(pascal_type_print_varspec_prefix): Delete unused variable.
* f-typeprint.c (f_type_print_base): Delete unused variable.
(f_type_print_varspec_suffix): Delete unused variable.
* m2-typeprint.c (m2_print_type): Delete unused variable.
(m2_long_set): Delete unused variable.
* ada-valprint.c (ada_val_print_1): Delete unused variable.
* d-valprint.c (dynamic_array_type): Delete unused variable.
* f-valprint.c (f77_get_dynamic_length_of_aggregate):
Delete unused variable.
(f77_create_arrayprint_offset_tbl): Delete unused variable.
* m2-valprint.c (m2_val_print): Delete unused variable.
Index: f-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/f-typeprint.c,v
retrieving revision 1.29
diff -u -p -r1.29 f-typeprint.c
--- f-typeprint.c 1 Jan 2010 07:31:31 -0000 1.29
+++ f-typeprint.c 7 May 2010 00:27:00 -0000
@@ -153,7 +153,7 @@ f_type_print_varspec_suffix (struct type
int arrayprint_recurse_level)
{
int upper_bound, lower_bound;
- int retcode;
+
/* No static variables are permitted as an error call may occur during
execution of this function. */
@@ -258,9 +258,7 @@ void
f_type_print_base (struct type *type, struct ui_file *stream, int show,
int level)
{
- int retcode;
int upper_bound;
-
int index;
QUIT;
Index: m2-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/m2-typeprint.c,v
retrieving revision 1.24
diff -u -p -r1.24 m2-typeprint.c
--- m2-typeprint.c 19 Feb 2010 22:22:48 -0000 1.24
+++ m2-typeprint.c 7 May 2010 00:27:00 -0000
@@ -71,7 +71,6 @@ m2_print_type (struct type *type, char *
int show, int level)
{
enum type_code code;
- int demangled_args;
CHECK_TYPEDEF (type);
@@ -424,8 +423,6 @@ m2_is_long_set_of_type (struct type *typ
static int
m2_long_set (struct type *type, struct ui_file *stream, int show, int level)
{
- struct type *index_type;
- struct type *range_type;
struct type *of_type;
int i;
int len = TYPE_NFIELDS (type);
Index: p-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-typeprint.c,v
retrieving revision 1.30
diff -u -p -r1.30 p-typeprint.c
--- p-typeprint.c 19 Feb 2010 22:22:49 -0000 1.30
+++ p-typeprint.c 7 May 2010 00:27:00 -0000
@@ -205,7 +205,6 @@ void
pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
int show, int passed_a_ptr)
{
- char *name;
if (type == 0)
return;
@@ -618,7 +617,7 @@ pascal_type_print_base (struct type *typ
struct fn_field *f = TYPE_FN_FIELDLIST1 (type, i);
int j, len2 = TYPE_FN_FIELDLIST_LENGTH (type, i);
char *method_name = TYPE_FN_FIELDLIST_NAME (type, i);
- char *name = type_name_no_tag (type);
+
/* this is GNU C++ specific
how can we know constructor/destructor?
It might work for GNU pascal */
Index: ada-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-valprint.c,v
retrieving revision 1.62
diff -u -p -r1.62 ada-valprint.c
--- ada-valprint.c 20 Apr 2010 22:26:56 -0000 1.62
+++ ada-valprint.c 7 May 2010 00:27:00 -0000
@@ -681,7 +681,6 @@ ada_val_print_1 (struct type *type, cons
unsigned int len;
int i;
struct type *elttype;
- unsigned int eltlen;
LONGEST val;
const gdb_byte *valaddr = valaddr0 + embedded_offset;
Index: d-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/d-valprint.c,v
retrieving revision 1.1
diff -u -p -r1.1 d-valprint.c
--- d-valprint.c 29 Apr 2010 14:45:38 -0000 1.1
+++ d-valprint.c 7 May 2010 00:27:00 -0000
@@ -42,7 +42,6 @@ dynamic_array_type (struct type *type, c
struct type *elttype;
struct type *true_type;
struct type *ptr_type;
- struct type *range_type;
const gdb_byte *ptraddr;
struct value *val;
int length;
Index: f-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/f-valprint.c,v
retrieving revision 1.55
diff -u -p -r1.55 f-valprint.c
--- f-valprint.c 14 Jan 2010 08:03:36 -0000 1.55
+++ f-valprint.c 7 May 2010 00:27:00 -0000
@@ -92,7 +92,6 @@ f77_get_dynamic_length_of_aggregate (str
{
int upper_bound = -1;
int lower_bound = 1;
- int retcode;
/* Recursively go all the way down into a possibly multi-dimensional
F77 array and get the bounds. For simple arrays, this is pretty
@@ -126,7 +125,7 @@ f77_create_arrayprint_offset_tbl (struct
struct type *tmp_type;
int eltlen;
int ndimen = 1;
- int upper, lower, retcode;
+ int upper, lower;
tmp_type = type;
Index: m2-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/m2-valprint.c,v
retrieving revision 1.26
diff -u -p -r1.26 m2-valprint.c
--- m2-valprint.c 14 Jan 2010 08:03:36 -0000 1.26
+++ m2-valprint.c 7 May 2010 00:27:00 -0000
@@ -322,8 +322,6 @@ m2_val_print (struct type *type, const g
unsigned len;
struct type *elttype;
unsigned eltlen;
- int length_pos, length_size, string_pos;
- int char_size;
LONGEST val;
CORE_ADDR addr;