Pass WARNS=3

This commit is contained in:
christos 2004-10-30 19:29:27 +00:00
parent 175795754a
commit 027df12dd8
3 changed files with 11 additions and 7 deletions

View File

@ -1,8 +1,9 @@
# $NetBSD: Makefile,v 1.78 2004/06/06 07:03:11 christos Exp $
# $NetBSD: Makefile,v 1.79 2004/10/30 19:29:27 christos Exp $
# @(#)Makefile 8.4 (Berkeley) 5/5/95
.include <bsd.own.mk>
WARNS=3
YHEADER=1
PROG= sh
SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \

View File

@ -1,4 +1,4 @@
/* $NetBSD: eval.c,v 1.79 2004/06/30 09:32:38 mycroft Exp $ */
/* $NetBSD: eval.c,v 1.80 2004/10/30 19:29:27 christos Exp $ */
/*-
* Copyright (c) 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
#else
__RCSID("$NetBSD: eval.c,v 1.79 2004/06/30 09:32:38 mycroft Exp $");
__RCSID("$NetBSD: eval.c,v 1.80 2004/10/30 19:29:27 christos Exp $");
#endif
#endif /* not lint */
@ -605,6 +605,7 @@ syspath(void)
{
static char *sys_path = NULL;
static int mib[] = {CTL_USER, USER_CS_PATH};
static char def_path[] = "PATH=/usr/bin:/bin:/usr/sbin:/sbin";
size_t len;
if (sys_path == NULL) {
@ -615,7 +616,7 @@ syspath(void)
} else {
ckfree(sys_path);
/* something to keep things happy */
sys_path = "PATH=/usr/bin:/bin:/usr/sbin:/sbin";
sys_path = def_path;
}
}
return sys_path;

View File

@ -1,4 +1,4 @@
/* $NetBSD: options.c,v 1.36 2004/01/05 23:23:32 jmmv Exp $ */
/* $NetBSD: options.c,v 1.37 2004/10/30 19:29:27 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: options.c,v 1.36 2004/01/05 23:23:32 jmmv Exp $");
__RCSID("$NetBSD: options.c,v 1.37 2004/10/30 19:29:27 christos Exp $");
#endif
#endif /* not lint */
@ -151,6 +151,7 @@ optschanged(void)
STATIC void
options(int cmdline)
{
static char empty[] = "";
char *p;
int val;
int c;
@ -180,7 +181,8 @@ options(int cmdline)
}
while ((c = *p++) != '\0') {
if (c == 'c' && cmdline) {
minusc = ""; /* command is after shell args*/
/* command is after shell args*/
minusc = empty;
} else if (c == 'o') {
minus_o(*argptr, val);
if (*argptr)