From owner-freebsd-audit Fri Sep 14 8:30:44 2001 Delivered-To: freebsd-audit@freebsd.org Received: from arb.arb.za.net (arb.arb.za.net [196.7.148.4]) by hub.freebsd.org (Postfix) with ESMTP id 16E7037B40B for ; Fri, 14 Sep 2001 08:30:34 -0700 (PDT) Received: (from uucp@localhost) by arb.arb.za.net (8.11.3/8.11.3) with UUCP id f8EFTne09687; Fri, 14 Sep 2001 17:29:49 +0200 (SAST) (envelope-from mark@grondar.za) Received: from grondar.za (localhost [127.0.0.1]) by grimreaper.grondar.za (8.11.6/8.11.4) with ESMTP id f8EEsPu95327; Fri, 14 Sep 2001 15:54:26 +0100 (BST) (envelope-from mark@grondar.za) Message-Id: <200109141454.f8EEsPu95327@grimreaper.grondar.za> To: Bruce Evans Cc: audit@FreeBSD.ORG Subject: Re: WARNS=2 cleanup for lex and yacc References: <20010914211123.O18340-100000@delplex.bde.org> In-Reply-To: <20010914211123.O18340-100000@delplex.bde.org> ; from Bruce Evans "Fri, 14 Sep 2001 21:54:28 +1000." Date: Fri, 14 Sep 2001 15:54:25 +0100 From: Mark Murray 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 Hi Thanks for the comments! > On Wed, 12 Sep 2001, Mark Murray wrote: > > > Please review > > > Index: lex/Makefile > > ... > > Lex is gnu flex so it shouldn't be maintained by FreeBSD. Damn. :-(. OK. What lex(1) did CSRG originally use? > > +WARNS?= 2 > > Don't blindly add to the end of sorted lists. Definitions in Makefiles > are mostly sorted in the order in which they are used in the build, and > this Makefile was no exception. (WARNS goes after CFLAGS which goes > after SRCS.) Aaah. I get the order approach. That notwitstanding, I am doing a "WARNS?=2" sweep through _all_ of src/usr.bin/*, and I am removing all the "-Wall"'s and WARNS?=2, on the grounds that a "WARNS?=2" ins src/usr.bin/Makefile.inc will cover that. In the case of src/contrib code or (other)(currently) "difficult" fixes, I am explicitly adding a "WARNS?=[01]". > > Index: yacc/main.c > > =================================================================== > > RCS file: /home/ncvs/src/usr.bin/yacc/main.c,v > > retrieving revision 1.12 > > diff -u -d -r1.12 main.c > > --- yacc/main.c 10 Jan 2000 20:26:24 -0000 1.12 > > +++ yacc/main.c 12 Sep 2001 14:40:50 -0000 > > @@ -60,9 +60,9 @@ > > char tflag; > > char vflag; > > > > -char *symbol_prefix; > > -char *file_prefix = "y"; > > -char *temp_form = "yacc.XXXXXXXXXXX"; > > +const char *symbol_prefix; > > +const char *file_prefix = "y"; > > +const char *temp_form = "yacc.XXXXXXXXXXX"; > > Use an array for things like this. I wish I could :-(. These pointers have something else assigned to them later. M -- o Mark Murray \_ FreeBSD Services Limited O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message