diff options
author | Pedro Alves <palves@redhat.com> | 2013-04-19 15:29:09 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-04-19 15:29:09 +0000 |
commit | 89f6d8377b9a3a157db806a7b3fb30f3f8e353ca (patch) | |
tree | 9597dce795569dd4bc4420e5808b9b24b7406294 /gdb/python/py-prettyprint.c | |
parent | ce6ec7d8d0bdec44a432131dfacc27917965f29f (diff) | |
download | binutils-gdb-89f6d8377b9a3a157db806a7b3fb30f3f8e353ca.tar.gz |
-Wpointer-sign: python/.
This fixes -Wpointer-sign warnings in the python/ code in the manner
that seems most appropriate to me.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* python/py-inferior.c (infpy_write_memory): Add cast to gdb_byte
* python/py-prettyprint.c (print_string_repr): Change type of
'output' local to char *. Add cast to gdb_byte * in
LA_PRINT_STRING call.
(print_children): Change type of 'output' local to char *.
* python/py-value.c (valpy_string): Add cast to const char * in
PyUnicode_Decode call.
Diffstat (limited to 'gdb/python/py-prettyprint.c')
-rw-r--r-- | gdb/python/py-prettyprint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index dbf6c22a5ff..b50e757a018 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -343,13 +343,13 @@ print_string_repr (PyObject *printer, const char *hint, string = python_string_to_target_python_string (py_str); if (string) { - gdb_byte *output; + char *output; long length; struct type *type; make_cleanup_py_decref (string); #ifdef IS_PY3K - output = (gdb_byte *) PyBytes_AS_STRING (string); + output = PyBytes_AS_STRING (string); length = PyBytes_GET_SIZE (string); #else output = PyString_AsString (string); @@ -358,8 +358,8 @@ print_string_repr (PyObject *printer, const char *hint, type = builtin_type (gdbarch)->builtin_char; if (hint && !strcmp (hint, "string")) - LA_PRINT_STRING (stream, type, output, length, NULL, - 0, options); + LA_PRINT_STRING (stream, type, (gdb_byte *) output, + length, NULL, 0, options); else fputs_filtered (output, stream); } @@ -634,7 +634,7 @@ print_children (PyObject *printer, const char *hint, } else if (gdbpy_is_string (py_v)) { - gdb_byte *output; + char *output; output = python_string_to_host_string (py_v); if (!output) |