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] Remove two unnecessary returns in ada-lang.c Date: Fri, 17 Feb 2023 17:26:24 +0000 (GMT) [thread overview] Message-ID: <20230217172624.36B16385781F@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fe0431855aba332f12ef80b0af65d5a6653f9c96 commit fe0431855aba332f12ef80b0af65d5a6653f9c96 Author: Tom Tromey <tromey@adacore.com> Date: Fri Feb 17 10:24:16 2023 -0700 Remove two unnecessary returns in ada-lang.c I found a couple of spots in ada-lang.c where a return follows a call to error. These are unnecessary because error never returns. Diff: --- gdb/ada-lang.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index eb81d737ca0..75c5f5ebd6e 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -11731,11 +11731,8 @@ ada_has_this_exception_support (const struct exception_support_info *einfo) /* Make sure that the symbol we found corresponds to a function. */ if (sym->aclass () != LOC_BLOCK) - { - error (_("Symbol \"%s\" is not a function (class = %d)"), - sym->linkage_name (), sym->aclass ()); - return 0; - } + error (_("Symbol \"%s\" is not a function (class = %d)"), + sym->linkage_name (), sym->aclass ()); sym = standard_lookup (einfo->catch_handlers_sym, NULL, VAR_DOMAIN); if (sym == NULL) @@ -11754,11 +11751,8 @@ ada_has_this_exception_support (const struct exception_support_info *einfo) /* Make sure that the symbol we found corresponds to a function. */ if (sym->aclass () != LOC_BLOCK) - { - error (_("Symbol \"%s\" is not a function (class = %d)"), - sym->linkage_name (), sym->aclass ()); - return 0; - } + error (_("Symbol \"%s\" is not a function (class = %d)"), + sym->linkage_name (), sym->aclass ()); return 1; }
reply other threads:[~2023-02-17 17:26 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=20230217172624.36B16385781F@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).