[RFA 07/13] Remove unused declaration from py-prettyprint.c

Tom Tromey
2018-07-12T20:52:38Z

This removes an unused declaration from py-prettyprint.c, but leaves
the call to value_contents_for_printing, as it may throw.

2018-07-12 Tom Tromey <tom@tromey.com>

* python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Call
value_contents_for_printing for effect.
---
gdb/ChangeLog | 5 +++++
gdb/python/py-prettyprint.c | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index 21b1ce94879..bfcbc95178e 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -662,7 +662,9 @@ gdbpy_apply_val_pretty_printer (const struct extension_language_defn *extlang,
struct gdbarch *gdbarch = get_type_arch (type);
struct value *value;
enum string_repr_result print_result;
- const gdb_byte *valaddr = value_contents_for_printing (val);
+
+ /* Call for side effects. */
+ value_contents_for_printing (val);

/* No pretty-printer support for unavailable values. */
if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type)))
--
2.13.6