Path: utzoo!attcan!uunet!vsedev!logan
From: logan@vsedev.VSE.COM (James Logan III)
Newsgroups: comp.lang.c
Subject: A lint question
Message-ID: <1256@vsedev.VSE.COM>
Date: 28 Nov 88 15:26:06 GMT
Reply-To: logan@vsedev.VSE.COM (James Logan III)
Organization: VSE Software Development Lab
Lines: 42

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
inconsistent with the number of parameters with one call to
malloc()?  The calls look like this:  

extern char *malloc();
char *directory;
directory = (char *)malloc((int)stbuf.st_size);

if (read(fd, directory, (int)stbuf.st_size) != (int)stbuf.st_size) {
	.
	.
	.
}
while (read(fd, &mntbuf, sizeof(MNT)) == sizeof(MNT)) {
	.
	.
	.
}
while (read(fd, nextentry, sizeof(nextentry)) == sizeof(nextentry)) {
	.
	.
	.
}

They look pretty consistent to me, especially in the argument
count!  Any help would be appreciated.  Thanks in advance.  

			-Jim
-- 
Jim Logan		logan@vsedev.vse.com
(703) 892-0002		uucp:	..!uunet!vsedev!logan
			inet:	logan%vsedev.vse.com@uunet.uu.net