diff options
author | uqs <uqs@FreeBSD.org> | 2010-03-04 16:08:01 +0000 |
---|---|---|
committer | uqs <uqs@FreeBSD.org> | 2010-03-04 16:08:01 +0000 |
commit | f72efb7f74cf392f2be27cc94dcf76b263faa39b (patch) | |
tree | 7dac56ecb4b603c2516cad137401d67047b9d509 /bin | |
parent | 929d20f7632cb403555b48db3b9ce91ac8496a89 (diff) | |
download | FreeBSD-src-f72efb7f74cf392f2be27cc94dcf76b263faa39b.zip FreeBSD-src-f72efb7f74cf392f2be27cc94dcf76b263faa39b.tar.gz |
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))
Diffstat (limited to 'bin')
-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 32e2dfa..5a7e37d 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 2273c95..fad1866 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, ""); |