Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 2002 08:47:55 +0300
From:      Giorgos Keramidas <keramida@FreeBSD.org>
To:        audit@FreeBSD.org
Subject:   a bin/ls warning with WARNS=5
Message-ID:  <20020823054755.GA3344@hades.hell.gr>

next in thread | raw e-mail | index | archive | help
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 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?20020823054755.GA3344>