Xref: utzoo comp.sources.bugs:814 comp.lang.c:7621 Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!ucbvax!pasteur!ames!hao!gatech!udel!rochester!ritcv!cci632!ccicpg!nick From: nick@ccicpg.UUCP (Nick Crossley) Newsgroups: comp.sources.bugs,comp.lang.c Subject: Bugs in 'check' program Message-ID: <12799@ccicpg.UUCP> Date: 26 Feb 88 20:19:20 GMT Reply-To: nick@ccicpg.UUCP (Nick Crossley) Followup-To: comp.sources.bugs Organization: CCI CPG, Irvine CA Lines: 21 Keywords: check,lint Summary: 2 minor problems and one silly bug A few errors have been pointed out in my recently-posted 'check' program. First, the shar I used was not the most portable, and you might have to edit the tests on the line counts after each extract to use a numeric comparison (-ne) instead of a string comparison (!=). Thanks for noticing this to ccicpg!uunet!rlgvax!dennis (Dennis.Bednar) Second, the lexical analyser does not allow form-feeds in the source. Change line 40 of lex.l to add \f (and possibly \r) to the set of 'white-space' characters. Thanks to uunet!amdahl!nsc!taux01!taux02.taux01.UUCP!yuval (Gideon Yuval) for this one. Finally, my entry for 'silliest bug of the year' competition. In the routine 'cwarn' in lex.l, I declare on on-stack (auto) char[120], and then about three lines later, I call free on it! This does not make the next malloc very happy. Blame late-night last minute changes before posting! This was noticed by uunet!ubvax!pacbell!ptsfa!fdp (Frank Pedroni) Nick Crossley CCI, 9801 Muirlands, Irvine, CA 92718-2521, USA Tel. (714) 458-7282 uucp: ...!uunet!ccicpg!nick