Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/sed add an abort for a case that can't happen



details:   https://anonhg.NetBSD.org/src/rev/9b5549244f66
branches:  trunk
changeset: 460053:9b5549244f66
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Oct 05 20:22:36 2019 +0000

description:
add an abort for a case that can't happen

diffstat:

 usr.bin/sed/main.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 24e891d85f19 -r 9b5549244f66 usr.bin/sed/main.c
--- a/usr.bin/sed/main.c        Sat Oct 05 19:19:51 2019 +0000
+++ b/usr.bin/sed/main.c        Sat Oct 05 20:22:36 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.34 2015/03/12 12:40:41 christos Exp $       */
+/*     $NetBSD: main.c,v 1.35 2019/10/05 20:22:36 christos Exp $       */
 
 /*-
  * Copyright (c) 2013 Johann 'Myrkraverk' Oskarsson.
@@ -39,7 +39,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.34 2015/03/12 12:40:41 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.35 2019/10/05 20:22:36 christos Exp $");
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: head/usr.bin/sed/main.c 252231 2013-06-26 04:14:19Z pfg $");
 #endif
@@ -268,6 +268,8 @@
                        s = script->s;
                        state = ST_STRING;
                        goto again;
+               default:
+                       abort();
                }
        case ST_FILE:
                if ((p = fgets(buf, n, f)) != NULL) {



Home | Main Index | Thread Index | Old Index