From owner-freebsd-audit Thu Aug 22 23:22:11 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9ECBA37B400 for ; Thu, 22 Aug 2002 23:22:00 -0700 (PDT) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADEB443E6E for ; Thu, 22 Aug 2002 23:21:59 -0700 (PDT) (envelope-from keramida@FreeBSD.org) Received: from hades.hell.gr (patr530-a151.otenet.gr [212.205.215.151]) by mailsrv.otenet.gr (8.12.4/8.12.4) with ESMTP id g7N6LqpD012298 for ; Fri, 23 Aug 2002 09:21:56 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.5/8.12.5) with ESMTP id g7N6LmDq010581 for ; Fri, 23 Aug 2002 09:21:49 +0300 (EEST) (envelope-from keramida@FreeBSD.org) Received: (from charon@localhost) by hades.hell.gr (8.12.5/8.12.5/Submit) id g7N5luBY006265 for audit@freebsd.org; Fri, 23 Aug 2002 08:47:56 +0300 (EEST) (envelope-from keramida@FreeBSD.org) Date: Fri, 23 Aug 2002 08:47:55 +0300 From: Giorgos Keramidas To: audit@FreeBSD.org Subject: a bin/ls warning with WARNS=5 Message-ID: <20020823054755.GA3344@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 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