Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/bc/dist Remove dummy breaks and returns after b...



details:   https://anonhg.NetBSD.org/src/rev/ccce873ef7f4
branches:  trunk
changeset: 353030:ccce873ef7f4
user:      maya <maya%NetBSD.org@localhost>
date:      Tue Apr 18 04:35:18 2017 +0000

description:
Remove dummy breaks and returns after bc_exit
bc_exit being marked nonreturn silences compiler warnings.

diffstat:

 external/bsd/bc/dist/execute.c |  5 ++---
 external/bsd/bc/dist/main.c    |  7 +++----
 external/bsd/bc/dist/util.c    |  3 +--
 3 files changed, 6 insertions(+), 9 deletions(-)

diffs (71 lines):

diff -r 1faed4fc9123 -r ccce873ef7f4 external/bsd/bc/dist/execute.c
--- a/external/bsd/bc/dist/execute.c    Mon Apr 17 23:38:51 2017 +0000
+++ b/external/bsd/bc/dist/execute.c    Tue Apr 18 04:35:18 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: execute.c,v 1.1 2017/04/10 02:28:23 phil Exp $ */
+/*     $NetBSD: execute.c,v 1.2 2017/04/18 04:35:18 maya Exp $ */
 
 /*
  * Copyright (C) 1991-1994, 1997, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
@@ -313,8 +313,7 @@
       
       case 'h' : /* Halt the machine. */
        bc_exit (0);
-        /* NOTREACHED */
-        break;
+       /* NOTREACHED */
 
       case 'i' : /* increment number */
        var_name = byte(&pc);
diff -r 1faed4fc9123 -r ccce873ef7f4 external/bsd/bc/dist/main.c
--- a/external/bsd/bc/dist/main.c       Mon Apr 17 23:38:51 2017 +0000
+++ b/external/bsd/bc/dist/main.c       Tue Apr 18 04:35:18 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.1 2017/04/10 02:28:23 phil Exp $ */
+/*     $NetBSD: main.c,v 1.2 2017/04/18 04:35:18 maya Exp $ */
 
 /*
  * Copyright (C) 1991-1994, 1997, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
@@ -113,7 +113,7 @@
        case 'h':  /* help */
          usage(argv[0]);
          bc_exit (0);
-         break;
+         /* NOTREACHED */
 
        case 'i':  /* force interactive */
          interactive = TRUE;
@@ -134,7 +134,7 @@
        case 'v':  /* Print the version. */
          show_bc_version ();
          bc_exit (0);
-         break;
+         /* NOTREACHED */
 
        case 'w':  /* Non standard features give warnings. */
          warn_not_std = TRUE;
@@ -270,7 +270,6 @@
     printf ("\n");
 
   bc_exit (0);
-  return 0; // to keep the compiler from complaining
 }
 
 
diff -r 1faed4fc9123 -r ccce873ef7f4 external/bsd/bc/dist/util.c
--- a/external/bsd/bc/dist/util.c       Mon Apr 17 23:38:51 2017 +0000
+++ b/external/bsd/bc/dist/util.c       Tue Apr 18 04:35:18 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.1 2017/04/10 02:28:23 phil Exp $ */
+/*     $NetBSD: util.c,v 1.2 2017/04/18 04:35:18 maya Exp $ */
 
 /*
  * Copyright (C) 1991-1994, 1997, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
@@ -628,7 +628,6 @@
   yyerror ("End of util.c/lookup() reached.  Please report this bug.");
   bc_exit (1);
   /*NOTREACHED*/
-  return 0;
 }
 
 /* Print out the limits of this program. */



Home | Main Index | Thread Index | Old Index