From owner-freebsd-audit Fri Sep 14 10:24:13 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id D28C237B407 for ; Fri, 14 Sep 2001 10:24:09 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id DAA21690; Sat, 15 Sep 2001 03:23:28 +1000 Date: Sat, 15 Sep 2001 03:23:03 +1000 (EST) From: Bruce Evans X-X-Sender: To: Mark Murray Cc: Subject: Re: WARNS=2 cleanup for lex and yacc In-Reply-To: <200109141454.f8EEsPu95327@grimreaper.grondar.za> Message-ID: <20010915031508.C20847-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Fri, 14 Sep 2001, Mark Murray wrote: > > Lex is gnu flex so it shouldn't be maintained by FreeBSD. > > Damn. :-(. OK. What lex(1) did CSRG originally use? Lite2, at least, seems to have only contrib/flex-2.5.2. > > > 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. Oops. Make that "This pointer" (temp_form). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message