A lint question

David MacKenzie edf at rocky2.rockefeller.edu
Tue Nov 29 19:31:13 AEST 1988


In article <1256 at vsedev.VSE.COM> logan at vsedev.VSE.COM (James Logan III) writes:
>I am having a problem with lint that I'm sure you have all seen
>before.  I have 3 calls to the read() function and one call to
>malloc() which are all used in the same way (same number and type
>of arguments), yet lint has this complaint:  
>
>function argument ( number ) used inconsistently
>    malloc( arg 1 )   	llib-lc(338) :: findlinks.c(114)
>    read( arg 3 )   	llib-lc(104) :: findlinks.c(127)
>
>I assume that lint is telling me that I am calling malloc() and
>read() with an inconsistent number or parameters.  How can I be

Actually, the "( number )" is just the column heading for the "arg n"
fields.  It means that argument number 1 was used inconsistently in with
how it was defined in the lint library for malloc, and argument number
3 was used inconsistently in read.  If you had called it with an
inconsistent number of parameters, that comes under a different heading
in the lint output, "function called with variable number of
arguments".
-----
David MacKenzie
Environmental Defense Fund
edf at rocky2.rockefeller.edu (...rutgers!cmcl2!rocky2!edf)



More information about the Comp.lang.c mailing list