diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c index 2359626424fc..f154a8920e20 100644 --- a/sys/ddb/db_input.c +++ b/sys/ddb/db_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_input.c,v 1.4 1994/06/29 06:31:08 cgd Exp $ */ +/* $NetBSD: db_input.c,v 1.5 1994/10/09 08:56:23 mycroft Exp $ */ /* * Mach Operating System @@ -227,8 +227,10 @@ db_check_interrupt() case CTRL('s'): do { c = cnmaygetc(); - if (c == CTRL('c')) + if (c == CTRL('c')) { db_error((char *)0); + /*NOTREACHED*/ + } } while (c != CTRL('q')); break; diff --git a/sys/ddb/db_lex.c b/sys/ddb/db_lex.c index af1ae3c68166..c4fec55bebd7 100644 --- a/sys/ddb/db_lex.c +++ b/sys/ddb/db_lex.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_lex.c,v 1.6 1994/10/09 08:30:03 mycroft Exp $ */ +/* $NetBSD: db_lex.c,v 1.7 1994/10/09 08:56:25 mycroft Exp $ */ /* * Mach Operating System @@ -171,8 +171,7 @@ db_lex() (c == '_')) { db_error("Bad character in number\n"); - db_flush_lex(); - return (tEOF); + /*NOTREACHED*/ } db_unread_char(c); return (tNUMBER); @@ -187,8 +186,10 @@ db_lex() cp = db_tok_string; if (c == '\\') { c = db_read_char(); - if (c == '\n' || c == -1) + if (c == '\n' || c == -1) { db_error("Bad escape\n"); + /*NOTREACHED*/ + } } *cp++ = c; while (1) { @@ -200,14 +201,15 @@ db_lex() { if (c == '\\') { c = db_read_char(); - if (c == '\n' || c == -1) + if (c == '\n' || c == -1) { db_error("Bad escape\n"); + /*NOTREACHED*/ + } } *cp++ = c; if (cp == db_tok_string+sizeof(db_tok_string)) { db_error("String too long\n"); - db_flush_lex(); - return (tEOF); + /*NOTREACHED*/ } continue; } diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 8eea203cc034..e557cc914671 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_sym.c,v 1.7 1994/06/29 06:31:18 cgd Exp $ */ +/* $NetBSD: db_sym.c,v 1.8 1994/10/09 08:56:27 mycroft Exp $ */ /* * Mach Operating System @@ -199,6 +199,7 @@ db_lookup(symstr) *cp = ':'; if (i == MAXNOSYMTABS) { db_error("invalid symbol table name"); + /*NOTREACHED*/ } symstr = cp+1; } diff --git a/sys/ddb/db_variables.c b/sys/ddb/db_variables.c index 3a7881f6362c..21e6bcbf8129 100644 --- a/sys/ddb/db_variables.c +++ b/sys/ddb/db_variables.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_variables.c,v 1.6 1994/06/29 06:31:23 cgd Exp $ */ +/* $NetBSD: db_variables.c,v 1.7 1994/10/09 08:56:28 mycroft Exp $ */ /* * Mach Operating System @@ -73,7 +73,7 @@ db_find_variable(varp) } } db_error("Unknown variable\n"); - return (0); + /*NOTREACHED*/ } int @@ -140,11 +140,11 @@ db_set_cmd() t = db_read_token(); if (t != tDOLLAR) { db_error("Unknown variable\n"); - return; + /*NOTREACHED*/ } if (!db_find_variable(&vp)) { db_error("Unknown variable\n"); - return; + /*NOTREACHED*/ } t = db_read_token(); @@ -153,10 +153,11 @@ db_set_cmd() if (!db_expression(&value)) { db_error("No value\n"); - return; + /*NOTREACHED*/ } if (db_read_token() != tEOL) { db_error("?\n"); + /*NOTREACHED*/ } db_write_variable(vp, &value); diff --git a/sys/ddb/db_write_cmd.c b/sys/ddb/db_write_cmd.c index 3c70573469dc..8c324a33c98c 100644 --- a/sys/ddb/db_write_cmd.c +++ b/sys/ddb/db_write_cmd.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_write_cmd.c,v 1.4 1994/06/29 06:31:28 cgd Exp $ */ +/* $NetBSD: db_write_cmd.c,v 1.5 1994/10/09 08:56:30 mycroft Exp $ */ /* * Mach Operating System @@ -73,7 +73,7 @@ db_write_cmd(address, have_addr, count, modif) break; default: db_error("Unknown size\n"); - return; + /*NOTREACHED*/ } while (db_expression(&new_value)) { @@ -86,8 +86,10 @@ db_write_cmd(address, have_addr, count, modif) wrote_one = TRUE; } - if (!wrote_one) + if (!wrote_one) { db_error("Nothing written.\n"); + /*NOTREACHED*/ + } db_next = addr; db_prev = addr - size;