From ad7194d9e8b577a2e25a43ac0f9755d9de5505ee Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 9 Jan 2016 19:44:13 +0100 Subject: [PATCH] rtadvd(8)/rtadvctl(8): Raise WARNS to 6 and fix two warnings. --- usr.sbin/rtadvctl/Makefile | 1 - usr.sbin/rtadvd/Makefile | 2 -- usr.sbin/rtadvd/rtadvd.c | 5 ++--- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.sbin/rtadvctl/Makefile b/usr.sbin/rtadvctl/Makefile index 2001fed242..397a2ee944 100644 --- a/usr.sbin/rtadvctl/Makefile +++ b/usr.sbin/rtadvctl/Makefile @@ -8,6 +8,5 @@ MAN= rtadvctl.8 SRCS= rtadvctl.c control.c control_client.c if.c timer_subr.c CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../rtadvd -WARNS?= 1 .include diff --git a/usr.sbin/rtadvd/Makefile b/usr.sbin/rtadvd/Makefile index 4273d756a4..1105da1055 100644 --- a/usr.sbin/rtadvd/Makefile +++ b/usr.sbin/rtadvd/Makefile @@ -24,6 +24,4 @@ LDADD= -lutil CFLAGS+= -DHAVE_ARC4RANDOM -WARNS?= 1 - .include diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c index 7c50697225..23c15e5e89 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -182,7 +182,7 @@ main(int argc, char *argv[]) int i, ch; int fflag = 0, logopt; int error; - pid_t pid, otherpid; + pid_t otherpid; /* get command line options and arguments */ while ((ch = getopt(argc, argv, "c:C:dDfhM:p:Rs")) != -1) { @@ -276,7 +276,6 @@ main(int argc, char *argv[]) } /* record the current PID */ - pid = getpid(); pidfile_write(pfh); set[PFD_RAWSOCK].fd = sock.si_fd; @@ -1642,7 +1641,7 @@ struct ifinfo * if_indextoifinfo(int idx) { struct ifinfo *ifi; - char *name, name0[IFNAMSIZ]; + char name0[IFNAMSIZ]; /* Check if the interface has a valid name or not. */ if (if_indextoname(idx, name0) == NULL) -- 2.41.0