some lint cleanup

This commit is contained in:
tg 2005-06-08 22:34:03 +00:00
parent d518ab0023
commit a21be8d676
5 changed files with 26 additions and 28 deletions

8
edit.c
View File

@ -1,4 +1,4 @@
/** $MirOS: src/bin/mksh/edit.c,v 1.7 2005/06/08 22:22:23 tg Exp $ */
/** $MirOS: src/bin/mksh/edit.c,v 1.8 2005/06/08 22:34:02 tg Exp $ */
/* $OpenBSD: edit.c,v 1.29 2005/04/13 02:33:08 deraadt Exp $ */
/* $OpenBSD: edit.h,v 1.8 2005/03/28 21:28:22 deraadt Exp $ */
/* $OpenBSD: emacs.c,v 1.37 2005/03/30 17:16:37 deraadt Exp $ */
@ -10,7 +10,7 @@
#include <ctype.h>
#include <libgen.h>
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.7 2005/06/08 22:22:23 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.8 2005/06/08 22:34:02 tg Exp $");
#define BEL 0x07
@ -3788,7 +3788,7 @@ vi_cmd(int argcnt, const char *cmd)
case 'g':
if (!argcnt)
argcnt = hlast;
/* fall through */
/* FALLTHRU */
case 'G':
if (!argcnt)
argcnt = 1;
@ -3938,7 +3938,7 @@ vi_cmd(int argcnt, const char *cmd)
c3 = 1;
srchlen = 0;
lastsearch = *cmd;
/* fall through */
/* FALLTHRU */
case 'n':
case 'N':
if (lastsearch == ' ')

6
eval.c
View File

@ -1,4 +1,4 @@
/** $MirOS: src/bin/mksh/eval.c,v 1.3 2005/05/25 10:01:24 tg Exp $ */
/** $MirOS: src/bin/mksh/eval.c,v 1.4 2005/06/08 22:34:03 tg Exp $ */
/* $OpenBSD: eval.c,v 1.27 2005/03/30 17:16:37 deraadt Exp $ */
#include "sh.h"
@ -6,7 +6,7 @@
#include <dirent.h>
#include <pwd.h>
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.3 2005/05/25 10:01:24 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.4 2005/06/08 22:34:03 tg Exp $");
/*
* string expansion
@ -339,7 +339,7 @@ expand(char *cp, /* input word */
case '?':
f &= ~DOBLANK;
f |= DOTEMP_;
/* fall through */
/* FALLTHRU */
default:
/* Enable tilde expansion */
tilde_ok = 1;

12
lex.c
View File

@ -1,11 +1,11 @@
/** $MirOS: src/bin/mksh/lex.c,v 1.3 2005/06/08 21:51:21 tg Exp $ */
/** $MirOS: src/bin/mksh/lex.c,v 1.4 2005/06/08 22:34:03 tg Exp $ */
/* $OpenBSD: lex.c,v 1.36 2005/03/30 17:16:37 deraadt Exp $ */
#include "sh.h"
#include <ctype.h>
#include <libgen.h>
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.3 2005/06/08 21:51:21 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.4 2005/06/08 22:34:03 tg Exp $");
/* Structure to keep track of the lexing state and the various pieces of info
* needed for each particular state. */
@ -184,7 +184,7 @@ yylex(int cf)
*wp++ = c;
break;
}
/* fall through.. */
/* FALLTHRU */
Sbase1: /* includes *(...|...) pattern (*+?@!) */
if (c == '*' || c == '@' || c == '+' || c == '?' ||
c == '!') {
@ -197,7 +197,7 @@ yylex(int cf)
}
ungetsc(c2);
}
/* fall through.. */
/* FALLTHRU */
Sbase2: /* doesn't include *(...|...) pattern (*+?@!) */
switch (c) {
case '\\':
@ -504,7 +504,7 @@ yylex(int cf)
*wp++ = c;
break;
}
/* fall through.. */
/* FALLTHRU */
default:
if (c) { /* trailing \ is lost */
*wp++ = '\\';
@ -1123,7 +1123,7 @@ get_brace_var(XString *wsp, char *wp)
state = PS_SAW_HASH;
break;
}
/* fall through.. */
/* FALLTHRU */
case PS_SAW_HASH:
if (letter(c))
state = PS_IDENT;

22
main.c
View File

@ -1,4 +1,4 @@
/** $MirOS: src/bin/mksh/main.c,v 1.12 2005/06/08 22:22:24 tg Exp $ */
/** $MirOS: src/bin/mksh/main.c,v 1.13 2005/06/08 22:34:03 tg Exp $ */
/* $OpenBSD: main.c,v 1.38 2005/03/30 17:16:37 deraadt Exp $ */
/* $OpenBSD: tty.c,v 1.8 2005/03/30 17:16:37 deraadt Exp $ */
/* $OpenBSD: io.c,v 1.21 2005/03/30 17:16:37 deraadt Exp $ */
@ -13,7 +13,7 @@
#include <time.h>
#endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.12 2005/06/08 22:22:24 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.13 2005/06/08 22:34:03 tg Exp $");
const char ksh_version[] = "@(#)MIRBSD KSH R23 2005/06/08";
@ -390,15 +390,15 @@ include(const char *name, int argc, char **argv, int intr_ok)
*/
if (intr_ok && (exstat - 128) != SIGTERM)
return 1;
/* fall through... */
/* FALLTHRU */
case LEXIT:
case LLEAVE:
case LSHELL:
unwind(i);
/*NOREACHED*/
/* NOTREACHED */
default:
internal_errorf(1, "include: %d", i);
/*NOREACHED*/
/* NOTREACHED */
}
}
if (argv) {
@ -468,19 +468,19 @@ shell(Source * volatile s, volatile int toplevel)
s->start = s->str = null;
break;
}
/* fall through... */
/* FALLTHRU */
case LEXIT:
case LLEAVE:
case LRETURN:
source = old_source;
quitenv(NULL);
unwind(i); /* keep on going */
/*NOREACHED*/
/* NOTREACHED */
default:
source = old_source;
quitenv(NULL);
internal_errorf(1, "shell: %d", i);
/*NOREACHED*/
/* NOTREACHED */
}
}
while (1) {
@ -551,13 +551,11 @@ unwind(int i)
case E_LOOP:
case E_ERRH:
siglongjmp(e->jbuf, i);
/*NOTREACHED*/
/* NOTREACHED */
case E_NONE:
if (i == LINTR)
e->flags |= EF_FAKE_SIGDIE;
/* Fall through... */
/* FALLTHRU */
default:
quitenv(NULL);
}

6
tree.c
View File

@ -1,9 +1,9 @@
/** $MirOS: src/bin/mksh/tree.c,v 1.1 2005/05/23 03:06:10 tg Exp $ */
/** $MirOS: src/bin/mksh/tree.c,v 1.2 2005/06/08 22:34:03 tg Exp $ */
/* $OpenBSD: tree.c,v 1.17 2005/03/30 17:16:37 deraadt Exp $ */
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.1 2005/05/23 03:06:10 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.2 2005/06/08 22:34:03 tg Exp $");
#define INDENT 4
@ -78,7 +78,7 @@ ptree(struct op *t, int indent, struct shf *shf)
}
case TSELECT:
fptreef(shf, indent, "select %s ", t->str);
/* fall through */
/* FALLTHRU */
case TFOR:
if (t->type == TFOR)
fptreef(shf, indent, "for %s ", t->str);