summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-12-26 14:33:55 +0000
committered <ed@FreeBSD.org>2009-12-26 14:33:55 +0000
commit5d9c8b273f251615bdd114673d51d70f0a92c8ba (patch)
tree6ea671d6ddcc011a7c3e2b9dbe78e8b3ab8c8637 /libexec
parente84a8ce0fe810e454ae207bb630d39f32f5ce374 (diff)
downloadFreeBSD-src-5d9c8b273f251615bdd114673d51d70f0a92c8ba.zip
FreeBSD-src-5d9c8b273f251615bdd114673d51d70f0a92c8ba.tar.gz
Modify the sources to make WARNS=6 work.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/talkd/Makefile3
-rw-r--r--libexec/talkd/process.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/libexec/talkd/Makefile b/libexec/talkd/Makefile
index 10f6519..4900857 100644
--- a/libexec/talkd/Makefile
+++ b/libexec/talkd/Makefile
@@ -6,7 +6,8 @@ SRCS= talkd.c announce.c process.c table.c print.c ttymsg.c
.PATH: ${.CURDIR}/../../usr.bin/wall
MAN= talkd.8
CFLAGS+=-I${.CURDIR}/../../usr.bin/wall
-WFORMAT=0
+
+WARNS?= 6
DPADD= ${LIBULOG}
LDADD= -lulog
diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c
index c6ec34d..d796cd5 100644
--- a/libexec/talkd/process.c
+++ b/libexec/talkd/process.c
@@ -155,8 +155,8 @@ do_announce(CTL_MSG *mp, CTL_RESPONSE *rp)
rp->answer = result;
return;
}
-#define satosin(sa) ((struct sockaddr_in *)(sa))
- hp = gethostbyaddr((char *)&satosin(&mp->ctl_addr)->sin_addr,
+#define satosin(sa) ((struct sockaddr_in *)(void *)(sa))
+ hp = gethostbyaddr(&satosin(&mp->ctl_addr)->sin_addr,
sizeof (struct in_addr), AF_INET);
if (hp == (struct hostent *)0) {
rp->answer = MACHINE_UNKNOWN;
OpenPOWER on IntegriCloud