[pushed] Remove two unnecessary returns in ada-lang.c

Message ID 20230217172532.2369102-1-tromey@adacore.com
State New
Headers
Series [pushed] Remove two unnecessary returns in ada-lang.c |

Commit Message

Tom Tromey Feb. 17, 2023, 5:25 p.m. UTC
  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.
---
 gdb/ada-lang.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
  

Patch

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;
 }