From: Tom Tromey Date: Tue, 2 Jul 2019 15:13:53 +0000 (-0600) Subject: Fix a FIXME in mi-out.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=07128006d6caec5df31a960b131d2026f35ed948;p=binutils-gdb.git Fix a FIXME in mi-out.c This removes a FIXME comment from mi_ui_out::do_field_int, by replacing a printf with a use of plongest. 2019-07-15 Tom Tromey * mi/mi-out.c (mi_ui_out::do_field_int): Use plongest. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1b085957682..bb2e8d133f1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-07-15 Tom Tromey + + * mi/mi-out.c (mi_ui_out::do_field_int): Use plongest. + 2019-07-15 Tom Tromey * mi/mi-out.h (class mi_ui_out) : Declare. diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index dd99a2b7fb1..75e3f0313d8 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -98,10 +98,7 @@ void mi_ui_out::do_field_int (int fldno, int width, ui_align alignment, const char *fldname, int value) { - char buffer[20]; /* FIXME: how many chars long a %d can become? */ - - xsnprintf (buffer, sizeof (buffer), "%d", value); - do_field_string (fldno, width, alignment, fldname, buffer, + do_field_string (fldno, width, alignment, fldname, plongest (value), ui_out_style_kind::DEFAULT); }