summaryrefslogtreecommitdiff
path: root/bin/ksh/exec.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-01-16 01:28:55 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-01-16 01:28:55 +0000
commit496e01e18f4d501ab034f7e71a4cb06167ff88c7 (patch)
tree3b457e6ee395b8d25e40dc6501edb7b037c62ff1 /bin/ksh/exec.c
parent51f4383f61889d34ee59c9078b745fc1afd1e51d (diff)
Use the volatile specifier to fix warnings about variables being
clobbered by longjmp / vfork instead of the gcc "(void)&foo;" hack.
Diffstat (limited to 'bin/ksh/exec.c')
-rw-r--r--bin/ksh/exec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c
index 137b0ba8502..270857662f8 100644
--- a/bin/ksh/exec.c
+++ b/bin/ksh/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.24 2001/07/19 16:46:27 millert Exp $ */
+/* $OpenBSD: exec.c,v 1.25 2002/01/16 01:28:54 millert Exp $ */
/*
* execute command tree
@@ -450,7 +450,7 @@ comexec(t, tp, ap, flags)
int volatile flags;
{
int i;
- int rv = 0;
+ volatile int rv = 0;
register char *cp;
register char **lastp;
static struct op texec; /* Must be static (XXX but why?) */
@@ -458,10 +458,6 @@ comexec(t, tp, ap, flags)
int keepasn_ok;
int fcflags = FC_BI|FC_FUNC|FC_PATH;
-#ifdef __GNUC__
- (void)&rv;
-#endif
-
#ifdef KSH
/* snag the last argument for $_ XXX not the same as at&t ksh,
* which only seems to set $_ after a newline (but not in