From owner-freebsd-audit Sat Jun 8 18:40: 5 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id A75B837B401 for ; Sat, 8 Jun 2002 18:39:58 -0700 (PDT) Received: from hades.hell.gr (patr530-a091.otenet.gr [212.205.215.91]) by mailsrv.otenet.gr (8.12.3/8.12.3) with ESMTP id g591duZN013615 for ; Sun, 9 Jun 2002 04:39:56 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.3/8.12.3) with ESMTP id g591dtUP072034 for ; Sun, 9 Jun 2002 04:39:55 +0300 (EEST) (envelope-from keramida@FreeBSD.org) Received: (from charon@localhost) by hades.hell.gr (8.12.3/8.12.3/Submit) id g591dsPg072033 for audit@FreeBSD.org; Sun, 9 Jun 2002 04:39:54 +0300 (EEST) (envelope-from keramida@FreeBSD.org) Date: Sun, 9 Jun 2002 04:39:53 +0300 From: Giorgos Keramidas To: audit@FreeBSD.org Subject: warns fixes for bin/date Message-ID: <20020609013953.GA71960@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The type of a variable passed to getsockopt and recvfrom in src/bin/date/netdate.c is `int'. Changing it to `socklen_t' fixes the only warnings that this utility has when compiling with WARNS=6. How does this look? %%% Index: Makefile =================================================================== RCS file: /home/ncvs/src/bin/date/Makefile,v retrieving revision 1.10 diff -u -r1.10 Makefile --- Makefile 4 Feb 2002 02:49:18 -0000 1.10 +++ Makefile 9 Jun 2002 01:34:21 -0000 @@ -3,7 +3,7 @@ PROG= date SRCS= date.c netdate.c vary.c -WARNS= 0 +WARNS= 6 WFORMAT=0 DPADD= ${LIBUTIL} LDADD= -lutil Index: netdate.c =================================================================== RCS file: /home/ncvs/src/bin/date/netdate.c,v retrieving revision 1.14 diff -u -r1.14 netdate.c --- netdate.c 22 Feb 2002 20:47:20 -0000 1.14 +++ netdate.c 9 Jun 2002 01:34:16 -0000 @@ -76,7 +76,8 @@ struct sockaddr_in lsin, dest, from; fd_set ready; long waittime; - int s, length, port, timed_ack, found, lerr; + int s, port, timed_ack, found, lerr; + socklen_t length; char hostname[MAXHOSTNAMELEN]; if ((sp = getservbyname("timed", "udp")) == NULL) { %%% To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message