How to let lint check your format strings

Eugene D. Brooks III brooks at lll-crg.ARPA
Wed Apr 10 14:28:09 AEST 1985


> Something that may not have been obvious....to turn it back off
> when the code is de-linted, have another .h file like this:
> 
> #define procent_a(a)	a
> #define procent_b(a)	a

The idea of having lint use constant format strings to check types and
arg counts is a great one.  I have wanted to do this for many years as
argument types and counts for printf and its buddies are one of my more
frequent errors.  Could we come up with a system that does not require any
includes or modifications to the code to do it?  This would be great!



More information about the Comp.lang.c mailing list