Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Patrick Monnerat <patrick@monnerat.net>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/4] gdb: remove some unnecessary code from print_gdb_hints
Date: Thu, 4 Dec 2025 18:14:49 +0100	[thread overview]
Message-ID: <c478a0a0-0f50-452a-bade-777a8d91f56f@monnerat.net> (raw)
In-Reply-To: <93ed8d79f824668677c77ab2f477b621b843be53.1764866150.git.aburgess@redhat.com>


On 12/4/25 5:38 PM, Andrew Burgess wrote:
> I noticed some code in print_gdb_hints that is unused.  There's a
> std::string that is never used, and a 'return' that is unnecessary, we
> can just drop out of the 'if' block and return at the end of the
> function.
>
> There should be no user visible changes after this commit.
> ---
>   gdb/top.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/gdb/top.c b/gdb/top.c
> index 0798fea7a3b..27ea3d95aec 100644
> --- a/gdb/top.c
> +++ b/gdb/top.c
> @@ -1444,11 +1444,8 @@ print_gdb_hints (struct ui_file *stream)
>        lines, but URLs can't.  */
>     if (width - 3 <= docs_url.length ())
>       {
> -      std::string sep (width, '-');
The above line has already been removed by 
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=06e470d8fc0ae0e83fe0977fdf8c011998980891 

>         for (string_file &msg : styled_msg)
>   	gdb_printf (stream, "%s\n", msg.c_str ());
> -
> -      return;
>       }
>     else
>       {
You're right for the return :-)

  reply	other threads:[~2025-12-04 17:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 16:38 [PATCH 0/4] Fixes and tests related to new boxed hint startup text Andrew Burgess
2025-12-04 16:38 ` [PATCH 1/4] gdb: remove some unnecessary code from print_gdb_hints Andrew Burgess
2025-12-04 17:14   ` Patrick Monnerat [this message]
2025-12-04 16:38 ` [PATCH 2/4] gdb: small white space fix in print_gdb_hints Andrew Burgess
2025-12-04 16:38 ` [PATCH 3/4] gdb: make get_chars_per_line return an unsigned value Andrew Burgess
2025-12-04 16:38 ` [PATCH 4/4] gdb: fix crashes and weird output from new boxed hint text Andrew Burgess
2025-12-04 19:02 ` [PATCH 0/4] Fixes and tests related to new boxed hint startup text Guinevere Larsen
2025-12-04 19:32   ` Andrew Burgess
2025-12-04 19:47 ` [PATCH 0/2] " Andrew Burgess
2025-12-04 19:47   ` [PATCH 1/2] gdb: make get_chars_per_line return an unsigned value Andrew Burgess
2025-12-04 19:47   ` [PATCH 2/2] gdb: fix crashes and weird output from new boxed hint text Andrew Burgess
2025-12-05  7:06     ` Eli Zaretskii
2025-12-05 10:17       ` Andrew Burgess
2025-12-05 11:19         ` Eli Zaretskii
2025-12-05 19:53   ` [PATCHv3 0/3] Fixes and tests related to new boxed hint startup text Andrew Burgess
2025-12-05 19:53     ` [PATCHv3 1/3] gdb: make get_chars_per_line return an unsigned value Andrew Burgess
2025-12-10 16:48       ` Tom Tromey
2025-12-05 19:53     ` [PATCHv3 2/3] gdb: fix crashes and weird output from new boxed hint text Andrew Burgess
2025-12-10 16:51       ` Tom Tromey
2025-12-05 19:53     ` [PATCHv3 3/3] WIP: disable progress bars setting Andrew Burgess
2025-12-06  9:12       ` Eli Zaretskii
2025-12-09 17:32       ` Andrew Burgess
2025-12-10 16:55         ` Tom Tromey
2025-12-15 15:33           ` Andrew Burgess
2025-12-16  7:40       ` Tom de Vries
2025-12-16 10:05         ` Andrew Burgess

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=c478a0a0-0f50-452a-bade-777a8d91f56f@monnerat.net \
    --to=patrick@monnerat.net \
    --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