summaryrefslogtreecommitdiffstats
path: root/bin/sh/eval.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2009-12-27 18:04:05 +0000
committerjilles <jilles@FreeBSD.org>2009-12-27 18:04:05 +0000
commit5e8a2136e77b00534434ca09013b82b54a34e781 (patch)
tree460140e6f2859387224bc3cf5cc7148cf75b3745 /bin/sh/eval.c
parent6d0737d0cb83394edfef580d58950553333a6cc1 (diff)
downloadFreeBSD-src-5e8a2136e77b00534434ca09013b82b54a34e781.zip
FreeBSD-src-5e8a2136e77b00534434ca09013b82b54a34e781.tar.gz
sh: Various warning fixes (from WARNS=6 NO_WERROR=1):
- const - initializations to silence -Wuninitialized (it was safe anyway) - remove nested extern declarations - rename "index" locals to "idx"
Diffstat (limited to 'bin/sh/eval.c')
-rw-r--r--bin/sh/eval.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c
index f772456..7875f82 100644
--- a/bin/sh/eval.c
+++ b/bin/sh/eval.c
@@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$");
#endif
-MKINIT int evalskip; /* set if we are skipping commands */
+int evalskip; /* set if we are skipping commands */
STATIC int skipcount; /* number of levels to skip */
MKINIT int loopnest; /* current loop nesting level */
int funcnest; /* depth of function calls */
@@ -407,8 +407,7 @@ evalsubshell(union node *n, int flags)
flags &=~ EV_TESTED;
redirect(n->nredir.redirect, 0);
evaltree(n->nredir.n, flags | EV_EXIT); /* never returns */
- }
- if (! backgnd) {
+ } else if (! backgnd) {
INTOFF;
exitstatus = waitforjob(jp, (int *)NULL);
INTON;
@@ -849,7 +848,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
listsetvar(cmdenviron);
commandname = argv[0];
argptr = argv + 1;
- optptr = NULL; /* initialize nextopt */
+ nextopt_optptr = NULL; /* initialize nextopt */
builtin_flags = flags;
exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv);
flushall();
OpenPOWER on IntegriCloud