diff options
author | Ulrich Spörlein <uqs@FreeBSD.org> | 2010-03-04 16:08:01 +0000 |
---|---|---|
committer | Ulrich Spörlein <uqs@FreeBSD.org> | 2010-03-04 16:08:01 +0000 |
commit | 55fa734d20e010f406eaa07885892c835deb7d9e (patch) | |
tree | 7dac56ecb4b603c2516cad137401d67047b9d509 /bin/ed | |
parent | 7f72022f3d4e7ee5d030b76ac08b91fc8cd9b08b (diff) | |
download | src-55fa734d20e010f406eaa07885892c835deb7d9e.tar.gz src-55fa734d20e010f406eaa07885892c835deb7d9e.zip |
ed(1): make WARNS=6 clean
Although argc and argv are never read after the longjmp is complete,
gcc is not clever enough to see that and needlessly warns about it.
So add volatile to silence the compiler.
Approved by: ed (the co-mentor, not ed(1))
Notes
Notes:
svn path=/head/; revision=204711
Diffstat (limited to 'bin/ed')
-rw-r--r-- | bin/ed/Makefile | 1 | ||||
-rw-r--r-- | bin/ed/main.c | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/bin/ed/Makefile b/bin/ed/Makefile index 32e2dfa721de..5a7e37de104a 100644 --- a/bin/ed/Makefile +++ b/bin/ed/Makefile @@ -4,7 +4,6 @@ PROG= ed SRCS= buf.c cbc.c glbl.c io.c main.c re.c sub.c undo.c -WARNS?= 2 LINKS= ${BINDIR}/ed ${BINDIR}/red MLINKS= ed.1 red.1 diff --git a/bin/ed/main.c b/bin/ed/main.c index 2273c951593a..fad1866d5344 100644 --- a/bin/ed/main.c +++ b/bin/ed/main.c @@ -103,15 +103,10 @@ const char usage[] = "usage: %s [-] [-sx] [-p string] [file]\n"; /* ed: line editor */ int -main(int argc, char *argv[]) +main(volatile int argc, char ** volatile argv) { int c, n; long status = 0; -#if __GNUC__ - /* Avoid longjmp clobbering */ - (void) &argc; - (void) &argv; -#endif (void)setlocale(LC_ALL, ""); |