From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 36B16385781F; Fri, 17 Feb 2023 17:26:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 36B16385781F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676654784; bh=UtsTnW/WTTeif5fPiU9p69C4aC0fKtRtoXSjTr74iPA=; h=From:To:Subject:Date:From; b=tiqRumCULZQ1sM3O3/vCeyWr3uRhcalFap/4TA2S7QXKP5BF3csjRb2n41RZNWZ53 BqtA6S8z9xFkw3fGCHlfTIawXC03d1/DC3XZTjcO/OWMFrE7nQuP2SkxSBm4+YwgbV xrXEYj8ZKNC3pl8phBgJi8IBT4ircQGdBZWxVHwo= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove two unnecessary returns in ada-lang.c X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: ab3fdfe6e4805eff45ec4d701d0cd6511d9c3690 X-Git-Newrev: fe0431855aba332f12ef80b0af65d5a6653f9c96 Message-Id: <20230217172624.36B16385781F@sourceware.org> Date: Fri, 17 Feb 2023 17:26:24 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dfe0431855aba= 332f12ef80b0af65d5a6653f9c96 commit fe0431855aba332f12ef80b0af65d5a6653f9c96 Author: Tom Tromey Date: Fri Feb 17 10:24:16 2023 -0700 Remove two unnecessary returns in ada-lang.c =20 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 excep= tion_support_info *einfo) /* Make sure that the symbol we found corresponds to a function. */ =20 if (sym->aclass () !=3D LOC_BLOCK) - { - error (_("Symbol \"%s\" is not a function (class =3D %d)"), - sym->linkage_name (), sym->aclass ()); - return 0; - } + error (_("Symbol \"%s\" is not a function (class =3D %d)"), + sym->linkage_name (), sym->aclass ()); =20 sym =3D standard_lookup (einfo->catch_handlers_sym, NULL, VAR_DOMAIN); if (sym =3D=3D NULL) @@ -11754,11 +11751,8 @@ ada_has_this_exception_support (const struct excep= tion_support_info *einfo) /* Make sure that the symbol we found corresponds to a function. */ =20 if (sym->aclass () !=3D LOC_BLOCK) - { - error (_("Symbol \"%s\" is not a function (class =3D %d)"), - sym->linkage_name (), sym->aclass ()); - return 0; - } + error (_("Symbol \"%s\" is not a function (class =3D %d)"), + sym->linkage_name (), sym->aclass ()); =20 return 1; }