public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix a FIXME in mi-out.c Date: Mon, 15 Jul 2019 15:36:00 -0000 [thread overview] Message-ID: <20190715153641.107699.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=07128006d6caec5df31a960b131d2026f35ed948 commit 07128006d6caec5df31a960b131d2026f35ed948 Author: Tom Tromey <tromey@adacore.com> Date: Tue Jul 2 09:13:53 2019 -0600 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. Diff: --- gdb/ChangeLog | 4 ++++ gdb/mi/mi-out.c | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1b08595..bb2e8d1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 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. * mi/mi-out.c (mi_ui_out::do_field_unsigned): New method. * cli-out.h (class cli_ui_out) <do_field_unsigned>: Declare. diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index dd99a2b..75e3f03 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); }
reply other threads:[~2019-07-15 15:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190715153641.107699.qmail@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).