diff -uprN src0/gdb/python/python-cmd.c src1/gdb/python/python-cmd.c --- src0/gdb/python/python-cmd.c 2009-07-06 09:28:25.000000000 -0400 +++ src1/gdb/python/python-cmd.c 2009-08-05 16:33:51.000000000 -0400 @@ -148,7 +148,6 @@ cmdpy_function (struct cmd_list_element if (! result) { PyObject *ptype, *pvalue, *ptraceback; - char *s, *str; PyErr_Fetch (&ptype, &pvalue, &ptraceback); @@ -224,7 +223,6 @@ cmdpy_completer (struct cmd_list_element 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 -uprN src0/gdb/python/python-function.c src1/gdb/python/python-function.c --- src0/gdb/python/python-function.c 2009-07-06 09:28:25.000000000 -0400 +++ src1/gdb/python/python-function.c 2009-08-05 16:34:07.000000000 -0400 @@ -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 -uprN src0/gdb/python/python-objfile.c src1/gdb/python/python-objfile.c --- src0/gdb/python/python-objfile.c 2009-07-06 09:28:25.000000000 -0400 +++ src1/gdb/python/python-objfile.c 2009-08-05 16:34:25.000000000 -0400 @@ -144,8 +144,6 @@ objfile_to_objfile_object (struct objfil object = PyObject_New (objfile_object, &objfile_object_type); if (object) { - PyObject *dict; - object->objfile = objfile; object->printers = PyList_New (0); diff -uprN src0/gdb/python/python-prettyprint.c src1/gdb/python/python-prettyprint.c --- src0/gdb/python/python-prettyprint.c 2009-07-09 17:20:17.000000000 -0400 +++ src1/gdb/python/python-prettyprint.c 2009-08-05 16:36:30.000000000 -0400 @@ -69,7 +69,6 @@ find_pretty_printer (PyObject *value) PyObject *pp_list = NULL; PyObject *function = NULL; struct objfile *obj; - volatile struct gdb_exception except; /* Look at the pretty-printer dictionary for each objfile. */ ALL_OBJFILES (obj) @@ -194,12 +193,12 @@ print_string_repr (PyObject *printer, co PyObject *string = python_string_to_target_python_string (py_str); if (string) { - gdb_byte *output = PyString_AsString (string); + char *output = PyString_AsString (string); int len = PyString_Size (string); if (hint && !strcmp (hint, "string")) LA_PRINT_STRING (stream, builtin_type (gdbarch)->builtin_char, - output, len, 0, options); + (gdb_byte *)output, len, 0, options); else fputs_filtered (output, stream); Py_DECREF (string); @@ -535,7 +534,6 @@ PyObject * apply_varobj_pretty_printer (PyObject *printer_obj, struct value **replacement) { - int size = 0; PyObject *py_str = NULL; *replacement = NULL; @@ -581,7 +579,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 -uprN src0/gdb/python/python-type.c src1/gdb/python/python-type.c --- src0/gdb/python/python-type.c 2009-07-06 09:28:25.000000000 -0400 +++ src1/gdb/python/python-type.c 2009-08-05 16:42:27.000000000 -0400 @@ -418,6 +418,8 @@ typy_lookup_type (struct demangle_compon return make_cv_type (1, 0, type, NULL); case DEMANGLE_COMPONENT_VOLATILE: return make_cv_type (0, 1, type, NULL); + default: + break; } } @@ -431,7 +433,7 @@ typy_lookup_type (struct demangle_compon 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 -uprN src0/gdb/python/python-utils.c src1/gdb/python/python-utils.c --- src0/gdb/python/python-utils.c 2009-07-09 17:20:17.000000000 -0400 +++ src1/gdb/python/python-utils.c 2009-08-05 16:43:18.000000000 -0400 @@ -206,9 +206,9 @@ PyObject * target_string_to_unicode (const gdb_byte *str, int length) { if (length == -1) - length = strlen (str); + length = strlen ((const char *)str); - return PyUnicode_Decode (str, length, target_charset (), NULL); + return PyUnicode_Decode ((const char *)str, length, target_charset (), NULL); } /* Return true if OBJ is a Python string or unicode object, false diff -uprN src0/gdb/python/python-value.c src1/gdb/python/python-value.c --- src0/gdb/python/python-value.c 2009-07-09 17:20:17.000000000 -0400 +++ src1/gdb/python/python-value.c 2009-08-05 16:44:07.000000000 -0400 @@ -198,7 +198,7 @@ valpy_get_type (PyObject *self, void *cl 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; @@ -220,7 +220,7 @@ valpy_string (PyObject *self, PyObject * GDB_PY_HANDLE_EXCEPTION (except); encoding = (user_encoding && *user_encoding) ? user_encoding : la_encoding; - unicode = PyUnicode_Decode (buffer, length, encoding, errors); + unicode = PyUnicode_Decode ((char *)buffer, length, encoding, errors); xfree (buffer); return unicode; @@ -827,7 +827,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 -uprN src0/gdb/python/python.c src1/gdb/python/python.c --- src0/gdb/python/python.c 2009-07-06 09:28:25.000000000 -0400 +++ src1/gdb/python/python.c 2009-08-05 16:33:28.000000000 -0400 @@ -247,6 +247,9 @@ parameter_to_python (struct cmd_list_ele Py_RETURN_NONE; return PyLong_FromUnsignedLong (val); } + case var_zuinteger: + /* FIXME: do what? */ + break; } return PyErr_Format (PyExc_RuntimeError, "programmer error: unhandled type"); @@ -288,8 +291,7 @@ gdbpy_parameter (PyObject *self, PyObjec 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;