aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-07 19:26:30 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-07 19:26:30 +0000
commitf92adf3ccc9f87786c3ed6ca1bf2ced52cfbcd62 (patch)
treee72a81d374f6d7bee2e29129648caf02cba1aab8 /gdb
parentd160942fa5f8a18a1b237c028254382bcb836924 (diff)
downloadgdb-f92adf3ccc9f87786c3ed6ca1bf2ced52cfbcd62.zip
gdb-f92adf3ccc9f87786c3ed6ca1bf2ced52cfbcd62.tar.gz
gdb-f92adf3ccc9f87786c3ed6ca1bf2ced52cfbcd62.tar.bz2
2010-05-07 Michael Snyder <msnyder@vmware.com>
* python/python.c (execute_gdb_command): Remove unused variables. * python/py-block.c (gdbpy_block_for_pc): Remove unused variable. * python/py-breakpoint.c (gdbpy_breakpoint_created): Remove unused variable. * python/py-cmd.c (cmdpy_function): Remove unused variable. (cmdpy_completer): Remove unused variable. * python/py-frame.c (frapy_find_sal): Remove unused variable. * python/py-function.c (fnpy_call): Remove unused variable. * python/py-objfile.c (objfile_to_objfile_object): Remove unused variable. * python/py-param.c (parmpy_init): Remove unused variable. * python/py-prettyprint.c (apply_varobj_pretty_printer): Remove unused variable. (gdbpy_default_visualizer): Remove unused variable. * python/py-progspace.c (pspace_to_pspace_object): Remove unused variable. * python/py-symtab.c (symtab_and_line_to_sal_object): Remove unused variable. * python/py-type.c (typy_template_argument): Remove unused variable. * python/py-value.c (valpy_string): Remove unused variable. (convert_value_from_python): Remove unused variables.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog25
-rw-r--r--gdb/python/py-block.c1
-rw-r--r--gdb/python/py-breakpoint.c2
-rw-r--r--gdb/python/py-cmd.c2
-rw-r--r--gdb/python/py-frame.c1
-rw-r--r--gdb/python/py-function.c1
-rw-r--r--gdb/python/py-objfile.c2
-rw-r--r--gdb/python/py-param.c1
-rw-r--r--gdb/python/py-prettyprint.c3
-rw-r--r--gdb/python/py-progspace.c2
-rw-r--r--gdb/python/py-symtab.c1
-rw-r--r--gdb/python/py-type.c2
-rw-r--r--gdb/python/py-value.c3
-rw-r--r--gdb/python/python.c3
14 files changed, 29 insertions, 20 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 950ce2f..32e9cd8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,30 @@
2010-05-07 Michael Snyder <msnyder@vmware.com>
+ * python/python.c (execute_gdb_command): Remove unused variables.
+ * python/py-block.c (gdbpy_block_for_pc): Remove unused variable.
+ * python/py-breakpoint.c (gdbpy_breakpoint_created):
+ Remove unused variable.
+ * python/py-cmd.c (cmdpy_function): Remove unused variable.
+ (cmdpy_completer): Remove unused variable.
+ * python/py-frame.c (frapy_find_sal): Remove unused variable.
+ * python/py-function.c (fnpy_call): Remove unused variable.
+ * python/py-objfile.c (objfile_to_objfile_object):
+ Remove unused variable.
+ * python/py-param.c (parmpy_init): Remove unused variable.
+ * python/py-prettyprint.c (apply_varobj_pretty_printer):
+ Remove unused variable.
+ (gdbpy_default_visualizer): Remove unused variable.
+ * python/py-progspace.c (pspace_to_pspace_object):
+ Remove unused variable.
+ * python/py-symtab.c (symtab_and_line_to_sal_object):
+ Remove unused variable.
+ * python/py-type.c (typy_template_argument):
+ Remove unused variable.
+ * python/py-value.c (valpy_string): Remove unused variable.
+ (convert_value_from_python): Remove unused variables.
+
+2010-05-07 Michael Snyder <msnyder@vmware.com>
+
* valops.c (value_cast_pointers): Restore unused variable 'type1',
and use it to compute variable 't1'.
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index d017030..4055174 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -271,7 +271,6 @@ gdbpy_block_for_pc (PyObject *self, PyObject *args)
struct block *block;
struct obj_section *section;
struct symtab *symtab;
- PyObject *sym_obj;
if (!PyArg_ParseTuple (args, "K", &pc))
return NULL;
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 4750d6d..24eebb7 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -706,8 +706,6 @@ gdbpy_breakpoint_created (int num)
newbp = PyObject_New (breakpoint_object, &breakpoint_object_type);
if (newbp)
{
- PyObject *hookfn;
-
newbp->number = num;
newbp->bp = bp;
bppy_breakpoints[num] = newbp;
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index 0998713..677a03d 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -148,7 +148,6 @@ cmdpy_function (struct cmd_list_element *command, char *args, int from_tty)
if (! result)
{
PyObject *ptype, *pvalue, *ptraceback;
- char *s, *str;
PyErr_Fetch (&ptype, &pvalue, &ptraceback);
@@ -224,7 +223,6 @@ cmdpy_completer (struct cmd_list_element *command, char *text, char *word)
result = (char **) xmalloc ((len + 1) * sizeof (char *));
for (i = out = 0; i < len; ++i)
{
- int l;
PyObject *elt = PySequence_GetItem (resultobj, i);
if (elt == NULL || ! gdbpy_is_string (elt))
{
diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c
index e930ae2..6e9e5d3 100644
--- a/gdb/python/py-frame.c
+++ b/gdb/python/py-frame.c
@@ -365,7 +365,6 @@ frapy_find_sal (PyObject *self, PyObject *args)
{
struct frame_info *frame;
struct symtab_and_line sal;
- struct objfile *objfile = NULL;
volatile struct gdb_exception except;
PyObject *sal_obj = NULL; /* Initialize to appease gcc warning. */
diff --git a/gdb/python/py-function.c b/gdb/python/py-function.c
index d472f03..7286d64 100644
--- a/gdb/python/py-function.c
+++ b/gdb/python/py-function.c
@@ -57,7 +57,6 @@ static struct value *
fnpy_call (struct gdbarch *gdbarch, const struct language_defn *language,
void *cookie, int argc, struct value **argv)
{
- int i;
struct value *value = NULL;
PyObject *result, *callable, *args;
struct cleanup *cleanup;
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 23655c6..732edb0 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -144,8 +144,6 @@ objfile_to_objfile_object (struct objfile *objfile)
object = PyObject_New (objfile_object, &objfile_object_type);
if (object)
{
- PyObject *dict;
-
object->objfile = objfile;
object->printers = PyList_New (0);
diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c
index 20ac993..e2319e5 100644
--- a/gdb/python/py-param.c
+++ b/gdb/python/py-param.c
@@ -456,7 +456,6 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
char *cmd_name;
int parmclass, cmdtype;
PyObject *enum_values = NULL;
- struct cmd_list_element *cmd_list;
struct cmd_list_element **set_list, **show_list;
volatile struct gdb_exception except;
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index d26ed58..dcca24d 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -661,7 +661,6 @@ PyObject *
apply_varobj_pretty_printer (PyObject *printer_obj,
struct value **replacement)
{
- int size = 0;
PyObject *py_str = NULL;
*replacement = NULL;
@@ -707,7 +706,7 @@ PyObject *
gdbpy_default_visualizer (PyObject *self, PyObject *args)
{
PyObject *val_obj;
- PyObject *cons, *printer = NULL;
+ PyObject *cons;
struct value *value;
if (! PyArg_ParseTuple (args, "O", &val_obj))
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index 1460878..ead616b 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -154,8 +154,6 @@ pspace_to_pspace_object (struct program_space *pspace)
object = PyObject_New (pspace_object, &pspace_object_type);
if (object)
{
- PyObject *dict;
-
object->pspace = pspace;
object->printers = PyList_New (0);
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index f91f322..6c805b7 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -321,7 +321,6 @@ symtab_and_line_to_sal_object (struct symtab_and_line sal)
{
sal_object *sal_obj;
- symtab_object *symtab_obj;
int success = 0;
sal_obj = PyObject_New (sal_object, &sal_object_type);
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 238b84a..ef658df 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -506,7 +506,7 @@ typy_lookup_type (struct demangle_component *demangled,
static PyObject *
typy_template_argument (PyObject *self, PyObject *args)
{
- int i, argno, n_pointers;
+ int i, argno;
struct type *type = ((type_object *) self)->type;
struct demangle_component *demangled;
const char *err;
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 7672b5d..173b3c9 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -259,7 +259,7 @@ valpy_lazy_string (PyObject *self, PyObject *args, PyObject *kw)
static PyObject *
valpy_string (PyObject *self, PyObject *args, PyObject *kw)
{
- int length = -1, ret = 0;
+ int length = -1;
gdb_byte *buffer;
struct value *value = ((value_object *) self)->value;
volatile struct gdb_exception except;
@@ -923,7 +923,6 @@ struct value *
convert_value_from_python (PyObject *obj)
{
struct value *value = NULL; /* -Wall */
- PyObject *target_str, *unicode_str;
struct cleanup *old;
volatile struct gdb_exception except;
int cmp;
diff --git a/gdb/python/python.c b/gdb/python/python.c
index cf87b66..0f66f67 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -303,8 +303,7 @@ gdbpy_target_wide_charset (PyObject *self, PyObject *args)
static PyObject *
execute_gdb_command (PyObject *self, PyObject *args)
{
- struct cmd_list_element *alias, *prefix, *cmd;
- char *arg, *newarg;
+ char *arg;
PyObject *from_tty_obj = NULL;
int from_tty;
int cmp;