Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Dec 2009 14:33:55 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r201022 - head/libexec/talkd
Message-ID:  <200912261433.nBQEXtj1012691@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sat Dec 26 14:33:55 2009
New Revision: 201022
URL: http://svn.freebsd.org/changeset/base/201022

Log:
  Modify the sources to make WARNS=6 work.

Modified:
  head/libexec/talkd/Makefile
  head/libexec/talkd/process.c

Modified: head/libexec/talkd/Makefile
==============================================================================
--- head/libexec/talkd/Makefile	Sat Dec 26 13:58:52 2009	(r201021)
+++ head/libexec/talkd/Makefile	Sat Dec 26 14:33:55 2009	(r201022)
@@ -6,7 +6,8 @@ SRCS=	talkd.c announce.c process.c table
 .PATH:  ${.CURDIR}/../../usr.bin/wall
 MAN=	talkd.8
 CFLAGS+=-I${.CURDIR}/../../usr.bin/wall
-WFORMAT=0
+
+WARNS?=	6
 
 DPADD=	${LIBULOG}
 LDADD=	-lulog

Modified: head/libexec/talkd/process.c
==============================================================================
--- head/libexec/talkd/process.c	Sat Dec 26 13:58:52 2009	(r201021)
+++ head/libexec/talkd/process.c	Sat Dec 26 14:33:55 2009	(r201022)
@@ -155,8 +155,8 @@ do_announce(CTL_MSG *mp, CTL_RESPONSE *r
 		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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912261433.nBQEXtj1012691>