From 5d9c8b273f251615bdd114673d51d70f0a92c8ba Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 26 Dec 2009 14:33:55 +0000 Subject: Modify the sources to make WARNS=6 work. --- libexec/talkd/Makefile | 3 ++- libexec/talkd/process.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'libexec') 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; -- cgit v1.1