diff options
author | 2014-07-11 15:29:46 +0000 | |
---|---|---|
committer | 2014-07-11 15:29:46 +0000 | |
commit | 08b6c03568e2348452cbd2b17a786cf4414e550d (patch) | |
tree | 217ae8bd2a21f930ed4b5b39aff3b745cb940388 | |
parent | Silence a compiler warning and build with -Wall etc. (diff) | |
download | wireguard-openbsd-08b6c03568e2348452cbd2b17a786cf4414e550d.tar.xz wireguard-openbsd-08b6c03568e2348452cbd2b17a786cf4414e550d.zip |
Silence compiler warning and build with -Wall etc.
OK benno@
-rw-r--r-- | sbin/ping/Makefile | 8 | ||||
-rw-r--r-- | sbin/ping/ping.c | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile index 5fb76e24f03..079a4681760 100644 --- a/sbin/ping/Makefile +++ b/sbin/ping/Makefile @@ -1,6 +1,12 @@ -# $OpenBSD: Makefile,v 1.6 2013/04/16 16:51:35 deraadt Exp $ +# $OpenBSD: Makefile,v 1.7 2014/07/11 15:29:46 florian Exp $ PROG= ping + +CFLAGS+= -Wall +CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes +CFLAGS+= -Wmissing-declarations +CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual + MAN= ping.8 BINOWN= root BINMODE=4555 diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 121c0b6e71d..ce6303aea5e 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.109 2014/07/11 15:26:55 florian Exp $ */ +/* $OpenBSD: ping.c,v 1.110 2014/07/11 15:29:46 florian Exp $ */ /* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */ /* @@ -1307,7 +1307,7 @@ check_icmph(struct ip *iph) #ifndef SMALL int -map_tos(char *s, int *val) +map_tos(char *key, int *val) { /* DiffServ Codepoints and other TOS mappings */ const struct toskeywords { @@ -1345,7 +1345,7 @@ map_tos(char *s, int *val) }; for (t = toskeywords; t->keyword != NULL; t++) { - if (strcmp(s, t->keyword) == 0) { + if (strcmp(key, t->keyword) == 0) { *val = t->val; return (1); } |