diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-01-16 01:28:55 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-01-16 01:28:55 +0000 |
commit | 496e01e18f4d501ab034f7e71a4cb06167ff88c7 (patch) | |
tree | 3b457e6ee395b8d25e40dc6501edb7b037c62ff1 /lib/libutil | |
parent | 51f4383f61889d34ee59c9078b745fc1afd1e51d (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 'lib/libutil')
-rw-r--r-- | lib/libutil/passwd.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/libutil/passwd.c b/lib/libutil/passwd.c index 461ed94fb6f..698407f4873 100644 --- a/lib/libutil/passwd.c +++ b/lib/libutil/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.29 2001/11/14 19:50:23 deraadt Exp $ */ +/* $OpenBSD: passwd.c,v 1.30 2002/01/16 01:28:54 millert Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: passwd.c,v 1.29 2001/11/14 19:50:23 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: passwd.c,v 1.30 2002/01/16 01:28:54 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -379,12 +379,10 @@ pw_edit(notsetuid, filename) const char *filename; { int pstat; - char *p, *editor; + char *p; + char * volatile editor; char *argp[] = {"sh", "-c", NULL, NULL}; -#ifdef __GNUC__ - (void)&editor; -#endif if (!filename) { filename = pw_lck; if (!filename) |