Date: Sun, 9 Jun 2002 04:39:53 +0300 From: Giorgos Keramidas <keramida@FreeBSD.org> To: audit@FreeBSD.org Subject: warns fixes for bin/date Message-ID: <20020609013953.GA71960@hades.hell.gr>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020609013953.GA71960>