From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH v2 4/4] Fix a FIXME in mi-out.c
Date: Tue, 02 Jul 2019 15:42:00 -0000 [thread overview]
Message-ID: <20190702153602.27637-5-tromey@adacore.com> (raw)
In-Reply-To: <20190702153602.27637-1-tromey@adacore.com>
This removes a FIXME comment from mi_ui_out::do_field_int, by
replacing a printf with a use of plongest.
gdb/ChangeLog
2019-07-02 Tom Tromey <tromey@adacore.com>
* mi/mi-out.c (mi_ui_out::do_field_int): Use plongest.
---
gdb/ChangeLog | 4 ++++
gdb/mi/mi-out.c | 5 +----
2 files changed, 5 insertions(+), 4 deletions(-)
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);
}
--
2.20.1
next prev parent reply other threads:[~2019-07-02 15:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-02 15:36 [PATCH v2 0/4] Remove many uses of field_fmt Tom Tromey
2019-07-02 15:36 ` [PATCH v2 1/4] Use field_core_addr in more places Tom Tromey
2019-07-02 15:36 ` [PATCH v2 2/4] Use field_string " Tom Tromey
2019-07-02 15:53 ` Andrew Burgess
2019-07-09 15:21 ` Tom Tromey
2019-07-02 15:36 ` [PATCH v2 3/4] Introduce field_unsigned Tom Tromey
2019-07-02 15:42 ` Tom Tromey [this message]
2019-07-02 15:59 ` [PATCH v2 0/4] Remove many uses of field_fmt Simon Marchi
2019-07-02 16:12 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190702153602.27637-5-tromey@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox