Date: Fri, 14 Sep 2001 15:54:25 +0100 From: Mark Murray <mark@grondar.za> To: Bruce Evans <bde@zeta.org.au> Cc: audit@FreeBSD.ORG Subject: Re: WARNS=2 cleanup for lex and yacc Message-ID: <200109141454.f8EEsPu95327@grimreaper.grondar.za> In-Reply-To: <20010914211123.O18340-100000@delplex.bde.org> ; from Bruce Evans <bde@zeta.org.au> "Fri, 14 Sep 2001 21:54:28 %2B1000." References: <20010914211123.O18340-100000@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109141454.f8EEsPu95327>