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  <tromey@adacore.com>

	* mi/mi-out.c (mi_ui_out::do_field_int): Use plongest.
This commit is contained in:
Tom Tromey 2019-07-02 09:13:53 -06:00
parent 1f77b012e6
commit 07128006d6
2 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2019-07-15 Tom Tromey <tromey@adacore.com>
* mi/mi-out.c (mi_ui_out::do_field_int): Use plongest.
2019-07-15 Tom Tromey <tromey@adacore.com>
* mi/mi-out.h (class mi_ui_out) <do_field_unsigned>: Declare.

View File

@ -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);
}