Can lint help an ANSI-C programmer?

Mark Harrison harrison at necssd.NEC.COM
Tue Jun 5 00:50:34 AEST 1990


In article <caNG2OS00as90XZ11a at andrew.cmu.edu>, ghoti+ at andrew.cmu.edu (Adam Stoller) writes:
 
> You may not care about the return value - but does your compiler take
> the time to warn you that you didn't supply a needed argument to the
> printf() call??
> 
> (does lint warn about this?)

Gimpel {PC,Flexe}-Lint checks printf/scanf strings.
printf("a[%d] = %d\n", a[i]) will get a warning.

When we checked our 70,000 line project (at a former company), we found
five or six problems like this, almost exclusively in fatal error
reporting code.
-- 
Mark Harrison             harrison at necssd.NEC.COM
(214)518-5050             {necntc, cs.utexas.edu}!necssd!harrison
standard disclaimers apply...



More information about the Comp.lang.c mailing list