aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-value.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-04-19 15:29:09 +0000
committerPedro Alves <palves@redhat.com>2013-04-19 15:29:09 +0000
commit89f6d8377b9a3a157db806a7b3fb30f3f8e353ca (patch)
tree9597dce795569dd4bc4420e5808b9b24b7406294 /gdb/python/py-value.c
parentce6ec7d8d0bdec44a432131dfacc27917965f29f (diff)
downloadgdb-89f6d8377b9a3a157db806a7b3fb30f3f8e353ca.zip
gdb-89f6d8377b9a3a157db806a7b3fb30f3f8e353ca.tar.gz
gdb-89f6d8377b9a3a157db806a7b3fb30f3f8e353ca.tar.bz2
-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-value.c')
-rw-r--r--gdb/python/py-value.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 11cc038..2cbb0cb 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -421,7 +421,8 @@ valpy_string (PyObject *self, PyObject *args, PyObject *kw)
GDB_PY_HANDLE_EXCEPTION (except);
encoding = (user_encoding && *user_encoding) ? user_encoding : la_encoding;
- unicode = PyUnicode_Decode (buffer, length * TYPE_LENGTH (char_type),
+ unicode = PyUnicode_Decode ((const char *) buffer,
+ length * TYPE_LENGTH (char_type),
encoding, errors);
xfree (buffer);