Remove dummy breaks and returns after bc_exit

bc_exit being marked nonreturn silences compiler warnings.
This commit is contained in:
maya 2017-04-18 04:35:18 +00:00
parent 932ce0ffe2
commit 341df6449e
3 changed files with 6 additions and 9 deletions

View File

@ -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 @@ execute (void)
case 'h' : /* Halt the machine. */
bc_exit (0);
/* NOTREACHED */
break;
/* NOTREACHED */
case 'i' : /* increment number */
var_name = byte(&pc);

View File

@ -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 @@ parse_args (int argc, char **argv)
case 'h': /* help */
usage(argv[0]);
bc_exit (0);
break;
/* NOTREACHED */
case 'i': /* force interactive */
interactive = TRUE;
@ -134,7 +134,7 @@ parse_args (int argc, char **argv)
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 @@ main (int argc, char **argv)
printf ("\n");
bc_exit (0);
return 0; // to keep the compiler from complaining
}

View File

@ -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 @@ lookup (char *name, int namekind)
yyerror ("End of util.c/lookup() reached. Please report this bug.");
bc_exit (1);
/*NOTREACHED*/
return 0;
}
/* Print out the limits of this program. */