Module Name: src Committed By: christos Date: Thu Sep 16 19:44:01 UTC 2021
Modified Files: src/bin/ksh: c_test.c shf.c tree.c vi.c Log Message: It is either teaching gcc about aaah or adding FALLTHROUGH. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/bin/ksh/c_test.c src/bin/ksh/tree.c cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/shf.c cvs rdiff -u -r1.20 -r1.21 src/bin/ksh/vi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/ksh/c_test.c diff -u src/bin/ksh/c_test.c:1.9 src/bin/ksh/c_test.c:1.10 --- src/bin/ksh/c_test.c:1.9 Fri Jun 30 00:41:19 2017 +++ src/bin/ksh/c_test.c Thu Sep 16 15:44:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: c_test.c,v 1.9 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: c_test.c,v 1.10 2021/09/16 19:44:01 christos Exp $ */ /* * test(1); version 7-like -- author Erik Baalbergen @@ -11,7 +11,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: c_test.c,v 1.9 2017/06/30 04:41:19 kamil Exp $"); +__RCSID("$NetBSD: c_test.c,v 1.10 2021/09/16 19:44:01 christos Exp $"); #endif #include <sys/stat.h> @@ -393,6 +393,7 @@ test_eval(te, op, opnd1, opnd2, do_eval) return v1 < v2; } } + abort(); case TO_FILNT: /* -nt */ { int s2; Index: src/bin/ksh/tree.c diff -u src/bin/ksh/tree.c:1.9 src/bin/ksh/tree.c:1.10 --- src/bin/ksh/tree.c:1.9 Tue May 8 12:37:59 2018 +++ src/bin/ksh/tree.c Thu Sep 16 15:44:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.9 2018/05/08 16:37:59 kamil Exp $ */ +/* $NetBSD: tree.c,v 1.10 2021/09/16 19:44:01 christos Exp $ */ /* * command tree climbing @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: tree.c,v 1.9 2018/05/08 16:37:59 kamil Exp $"); +__RCSID("$NetBSD: tree.c,v 1.10 2021/09/16 19:44:01 christos Exp $"); #endif @@ -106,8 +106,8 @@ ptree(t, indent, shf) #ifdef KSH case TSELECT: fptreef(shf, indent, "select %s ", t->str); - /* fall through */ #endif /* KSH */ + /*FALLTHROUGH*/ case TFOR: if (t->type == TFOR) fptreef(shf, indent, "for %s ", t->str); Index: src/bin/ksh/shf.c diff -u src/bin/ksh/shf.c:1.13 src/bin/ksh/shf.c:1.14 --- src/bin/ksh/shf.c:1.13 Thu Jun 29 23:56:12 2017 +++ src/bin/ksh/shf.c Thu Sep 16 15:44:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: shf.c,v 1.13 2017/06/30 03:56:12 kamil Exp $ */ +/* $NetBSD: shf.c,v 1.14 2021/09/16 19:44:01 christos Exp $ */ /* * Shell file I/O routines @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: shf.c,v 1.13 2017/06/30 03:56:12 kamil Exp $"); +__RCSID("$NetBSD: shf.c,v 1.14 2021/09/16 19:44:01 christos Exp $"); #endif #include <sys/stat.h> @@ -984,6 +984,7 @@ shf_vfprintf(shf, fmt, args) if (sizeof(char *) > sizeof(int)) flags |= FL_LONG; /* hope it fits.. */ /* aaahhh... */ + /*FALLTHROUGH*/ case 'd': case 'i': case 'o': @@ -1000,7 +1001,7 @@ shf_vfprintf(shf, fmt, args) else tmp = 0; /* aaahhhh..... */ - + /*FALLTHROUGH*/ case 'u': do { *--s = lnum % 10 + '0'; Index: src/bin/ksh/vi.c diff -u src/bin/ksh/vi.c:1.20 src/bin/ksh/vi.c:1.21 --- src/bin/ksh/vi.c:1.20 Tue May 8 12:37:59 2018 +++ src/bin/ksh/vi.c Thu Sep 16 15:44:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vi.c,v 1.20 2018/05/08 16:37:59 kamil Exp $ */ +/* $NetBSD: vi.c,v 1.21 2021/09/16 19:44:01 christos Exp $ */ /* * vi command editing @@ -9,7 +9,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: vi.c,v 1.20 2018/05/08 16:37:59 kamil Exp $"); +__RCSID("$NetBSD: vi.c,v 1.21 2021/09/16 19:44:01 christos Exp $"); #endif #include "config.h" @@ -793,6 +793,7 @@ vi_cmd(argcnt, cmd) case 'Y': cmd = "y$"; /* ahhhhhh... */ + /*FALLTHROUGH*/ case 'c': case 'd': case 'y': @@ -1004,6 +1005,7 @@ vi_cmd(argcnt, cmd) if (hnum == hlast) hnum = -1; /* ahhh */ + /*FALLTHROUGH*/ case '/': c3 = 1; srchlen = 0; @@ -1131,6 +1133,7 @@ vi_cmd(argcnt, cmd) case Ctrl('['): /* some annoying at&t ksh's */ if (!Flag(FVIESCCOMPLETE)) return -1; + /*FALLTHROUGH*/ case '\\': /* at&t ksh */ case Ctrl('f'): /* Nonstandard vi/ksh */ complete_word(1, argcnt); @@ -1194,7 +1197,7 @@ domove(argcnt, cmd, sub) fsavecmd = *cmd; fsavech = cmd[1]; /* drop through */ - + /*FALLTHROUGH*/ case ',': case ';': if (fsavecmd == ' ')