[pushed] Remove some redundant "break"s

Message ID 20231114173850.3612313-1-tromey@adacore.com
State New
Headers
Series [pushed] Remove some redundant "break"s |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Tom Tromey Nov. 14, 2023, 5:38 p.m. UTC
  I found some "break" statements that follow "return" or a call to a
noreturn function.  These aren't needed, and the compiler would warn
if they were.  So, this patch removes them.

Tested by rebuilding.
---
 gdb/breakpoint.c | 4 ----
 1 file changed, 4 deletions(-)
  

Patch

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index fe09dbcbeee..a6b9b2402ed 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4977,13 +4977,11 @@  print_bp_stop_message (bpstat *bs)
     case print_it_noop:
       /* Nothing should be printed for this bpstat entry.  */
       return PRINT_UNKNOWN;
-      break;
 
     case print_it_done:
       /* We still want to print the frame, but we already printed the
 	 relevant messages.  */
       return PRINT_SRC_AND_LOC;
-      break;
 
     case print_it_normal:
       {
@@ -4997,11 +4995,9 @@  print_bp_stop_message (bpstat *bs)
 	/* Normal case.  Call the breakpoint's print_it method.  */
 	return b->print_it (bs);
       }
-      break;
 
     default:
       internal_error (_("print_bp_stop_message: unrecognized enum value"));
-      break;
     }
 }