Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ksh It is either teaching gcc about aaah or adding FALLT...
details: https://anonhg.NetBSD.org/src/rev/eb1e7c9b03f4
branches: trunk
changeset: 1023582:eb1e7c9b03f4
user: christos <christos%NetBSD.org@localhost>
date: Thu Sep 16 19:44:01 2021 +0000
description:
It is either teaching gcc about aaah or adding FALLTHROUGH.
diffstat:
bin/ksh/c_test.c | 5 +++--
bin/ksh/shf.c | 7 ++++---
bin/ksh/tree.c | 6 +++---
bin/ksh/vi.c | 9 ++++++---
4 files changed, 16 insertions(+), 11 deletions(-)
diffs (140 lines):
diff -r 080105c88b29 -r eb1e7c9b03f4 bin/ksh/c_test.c
--- a/bin/ksh/c_test.c Thu Sep 16 19:43:33 2021 +0000
+++ b/bin/ksh/c_test.c Thu Sep 16 19:44:01 2021 +0000
@@ -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 @@
return v1 < v2;
}
}
+ abort();
case TO_FILNT: /* -nt */
{
int s2;
diff -r 080105c88b29 -r eb1e7c9b03f4 bin/ksh/shf.c
--- a/bin/ksh/shf.c Thu Sep 16 19:43:33 2021 +0000
+++ b/bin/ksh/shf.c Thu Sep 16 19:44:01 2021 +0000
@@ -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 @@
if (sizeof(char *) > sizeof(int))
flags |= FL_LONG; /* hope it fits.. */
/* aaahhh... */
+ /*FALLTHROUGH*/
case 'd':
case 'i':
case 'o':
@@ -1000,7 +1001,7 @@
else
tmp = 0;
/* aaahhhh..... */
-
+ /*FALLTHROUGH*/
case 'u':
do {
*--s = lnum % 10 + '0';
diff -r 080105c88b29 -r eb1e7c9b03f4 bin/ksh/tree.c
--- a/bin/ksh/tree.c Thu Sep 16 19:43:33 2021 +0000
+++ b/bin/ksh/tree.c Thu Sep 16 19:44:01 2021 +0000
@@ -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 @@
#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);
diff -r 080105c88b29 -r eb1e7c9b03f4 bin/ksh/vi.c
--- a/bin/ksh/vi.c Thu Sep 16 19:43:33 2021 +0000
+++ b/bin/ksh/vi.c Thu Sep 16 19:44:01 2021 +0000
@@ -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 @@
case 'Y':
cmd = "y$";
/* ahhhhhh... */
+ /*FALLTHROUGH*/
case 'c':
case 'd':
case 'y':
@@ -1004,6 +1005,7 @@
if (hnum == hlast)
hnum = -1;
/* ahhh */
+ /*FALLTHROUGH*/
case '/':
c3 = 1;
srchlen = 0;
@@ -1131,6 +1133,7 @@
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 @@
fsavecmd = *cmd;
fsavech = cmd[1];
/* drop through */
-
+ /*FALLTHROUGH*/
case ',':
case ';':
if (fsavecmd == ' ')
Home |
Main Index |
Thread Index |
Old Index