summaryrefslogtreecommitdiff
path: root/bin/sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/arith.y7
-rw-r--r--bin/sh/miscbltin.c6
-rw-r--r--bin/sh/options.c8
-rw-r--r--bin/sh/parser.c8
-rw-r--r--bin/sh/redir.c10
-rw-r--r--bin/sh/var.c7
6 files changed, 26 insertions, 20 deletions
diff --git a/bin/sh/arith.y b/bin/sh/arith.y
index a5e832d1f48..a3ba441230b 100644
--- a/bin/sh/arith.y
+++ b/bin/sh/arith.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: arith.y,v 1.2 1996/06/23 14:21:08 deraadt Exp $ */
+/* $OpenBSD: arith.y,v 1.3 1996/12/14 12:18:19 mickey Exp $ */
%token ARITH_NUM ARITH_LPAREN ARITH_RPAREN
%left ARITH_OR
@@ -96,7 +96,7 @@ expr: ARITH_LPAREN expr ARITH_RPAREN = { $$ = $2; }
#if 0
static char sccsid[] = "@(#)arith.y 8.3 (Berkeley) 5/4/95";
#else
-static char sccsid[] = "$OpenBSD: arith.y,v 1.2 1996/06/23 14:21:08 deraadt Exp $";
+static char sccsid[] = "$OpenBSD: arith.y,v 1.3 1996/12/14 12:18:19 mickey Exp $";
#endif
#endif /* not lint */
@@ -107,6 +107,9 @@ static char sccsid[] = "$OpenBSD: arith.y,v 1.2 1996/06/23 14:21:08 deraadt Exp
char *arith_buf, *arith_startbuf;
+int yyparse __P((void));
+int yylex __P((void));
+
int
arith(s)
char *s;
diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c
index 8b483e92e3c..f5efe2e9db5 100644
--- a/bin/sh/miscbltin.c
+++ b/bin/sh/miscbltin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: miscbltin.c,v 1.2 1996/06/23 14:21:22 deraadt Exp $ */
+/* $OpenBSD: miscbltin.c,v 1.3 1996/12/14 12:18:20 mickey Exp $ */
/* $NetBSD: miscbltin.c,v 1.15 1995/06/12 19:44:16 jtc Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
#else
-static char rcsid[] = "$OpenBSD: miscbltin.c,v 1.2 1996/06/23 14:21:22 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: miscbltin.c,v 1.3 1996/12/14 12:18:20 mickey Exp $";
#endif
#endif /* not lint */
@@ -295,7 +295,7 @@ ulimitcmd(argc, argv)
char **argv;
{
register int c;
- rlim_t val;
+ rlim_t val = 0;
enum { SOFT = 0x1, HARD = 0x2 }
how = SOFT | HARD;
const struct limits *l;
diff --git a/bin/sh/options.c b/bin/sh/options.c
index 1d54c05451b..3f109a3f1b1 100644
--- a/bin/sh/options.c
+++ b/bin/sh/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.6 1996/11/24 23:18:44 millert Exp $ */
+/* $OpenBSD: options.c,v 1.7 1996/12/14 12:18:21 mickey Exp $ */
/* $NetBSD: options.c,v 1.19 1996/11/06 01:17:11 christos Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 5/4/95";
#else
-static char rcsid[] = "$OpenBSD: options.c,v 1.6 1996/11/24 23:18:44 millert Exp $";
+static char rcsid[] = "$OpenBSD: options.c,v 1.7 1996/12/14 12:18:21 mickey Exp $";
#endif
#endif /* not lint */
@@ -381,12 +381,10 @@ getoptscmd(argc, argv)
int argc;
char **argv;
{
- char **optbase;
+ char **optbase = shellparam.p;
if (argc < 3)
error("Usage: getopts optstring var [arg]");
- else if (argc == 3)
- optbase = shellparam.p;
else
optbase = &argv[3];
diff --git a/bin/sh/parser.c b/bin/sh/parser.c
index 5205429be43..04eabad0f17 100644
--- a/bin/sh/parser.c
+++ b/bin/sh/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.6 1996/12/01 05:09:51 millert Exp $ */
+/* $OpenBSD: parser.c,v 1.7 1996/12/14 12:18:23 mickey Exp $ */
/* $NetBSD: parser.c,v 1.31 1996/11/25 20:22:00 christos Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95";
#else
-static char rcsid[] = "$OpenBSD: parser.c,v 1.6 1996/12/01 05:09:51 millert Exp $";
+static char rcsid[] = "$OpenBSD: parser.c,v 1.7 1996/12/14 12:18:23 mickey Exp $";
#endif
#endif /* not lint */
@@ -1258,7 +1258,9 @@ parsebackq: {
struct jmploc *volatile savehandler;
int savelen;
int saveprompt;
-
+#ifdef lint
+ saveprompt = 0;
+#endif
savepbq = parsebackquote;
if (setjmp(jmploc.loc)) {
if (str)
diff --git a/bin/sh/redir.c b/bin/sh/redir.c
index 1bad4d0246c..e2659ba25ab 100644
--- a/bin/sh/redir.c
+++ b/bin/sh/redir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: redir.c,v 1.3 1996/10/20 00:55:03 millert Exp $ */
+/* $OpenBSD: redir.c,v 1.4 1996/12/14 12:18:24 mickey Exp $ */
/* $NetBSD: redir.c,v 1.12 1995/05/11 21:30:10 christos Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)redir.c 8.2 (Berkeley) 5/4/95";
#else
-static char rcsid[] = "$OpenBSD: redir.c,v 1.3 1996/10/20 00:55:03 millert Exp $";
+static char rcsid[] = "$OpenBSD: redir.c,v 1.4 1996/12/14 12:18:24 mickey Exp $";
#endif
#endif /* not lint */
@@ -108,8 +108,10 @@ redirect(redir, flags)
struct redirtab *sv;
int i;
int fd;
- char memory[10]; /* file descriptors to write to memory */
-
+ char memory[10]; /* file descriptors to write to memory */
+#ifdef lint
+ sv = NULL;
+#endif
for (i = 10 ; --i >= 0 ; )
memory[i] = 0;
memory[1] = flags & REDIR_BACKQ;
diff --git a/bin/sh/var.c b/bin/sh/var.c
index 1f020ccccf2..5b350c6d445 100644
--- a/bin/sh/var.c
+++ b/bin/sh/var.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: var.c,v 1.3 1996/10/20 00:55:08 millert Exp $ */
+/* $OpenBSD: var.c,v 1.4 1996/12/14 12:18:25 mickey Exp $ */
/* $NetBSD: var.c,v 1.13 1995/05/11 21:30:39 christos Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 5/4/95";
#else
-static char rcsid[] = "$OpenBSD: var.c,v 1.3 1996/10/20 00:55:08 millert Exp $";
+static char rcsid[] = "$OpenBSD: var.c,v 1.4 1996/12/14 12:18:25 mickey Exp $";
#endif
#endif /* not lint */
@@ -201,11 +201,12 @@ setvarsafe(name, val, flags)
{
struct jmploc jmploc;
struct jmploc *volatile savehandler = handler;
- int err = 0;
+ int err;
if (setjmp(jmploc.loc))
err = 1;
else {
+ err = 0;
handler = &jmploc;
setvar(name, val, flags);
}