a bin/ls warning with WARNS=5

Giorgos Keramidas <[email protected]> Fri, 23 Aug 2002 08:47:55 +0300
Newsgroups gmane.os.freebsd.devel.audit
Message-ID <[email protected]>
How does this look?

The source of bin/ls explicitly sets NO_WERROR=0 to unbreak its build,
since print.c warns about an unused variable.  The following fixes the
warning and sets WARNS?=5 in the Makefile.  WFORMAT=0 remains since I
don't know how to fix the format warning :-/

%%%
Index: Makefile
===================================================================
RCS file: /home/ncvs/src/bin/ls/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- Makefile	4 Feb 2002 03:06:50 -0000	1.23
+++ Makefile	23 Aug 2002 05:39:28 -0000
@@ -3,7 +3,7 @@
 
 PROG=	ls
 SRCS=	cmp.c lomac.c ls.c print.c util.c
-NO_WERROR=1
+WARNS?=	5
 WFORMAT=0
 DPADD=	${LIBM}
 LDADD=	-lm
Index: print.c
===================================================================
RCS file: /home/ncvs/src/bin/ls/print.c,v
retrieving revision 1.56
diff -u -r1.56 print.c
--- print.c	30 Jun 2002 05:13:54 -0000	1.56
+++ print.c	2 Jul 2002 17:18:46 -0000
@@ -306,8 +306,7 @@
 	if (dp->list->fts_level != FTS_ROOTLEVEL && (f_longform || f_size))
 		(void)printf("total %lu\n", howmany(dp->btotal, blocksize));
 
-	if (f_sortacross)
-		base = 0;
+	base = 0;
 	for (row = 0; row < numrows; ++row) {
 		endcol = colwidth;
 		if (!f_sortacross)
%%%

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message