[net.micro.att] UNIX PC lint bug

adam@npois.UUCP (Adam V. Reed) (06/14/85)

Lint is properly silent on the following short program on our VAX:

void exit();
main() {int usv = 0;exit(tough((unsigned short)usv));}
tough(usv) unsigned short usv; {return (int)usv;}

With the same program on our UNIX PC, lint outputs the bogus diagnostic

==============
function argument ( number ) used inconsistently
    tough( arg 1 )      lintest.c(3) :: lintest.c(2)

It shuts up if the middle line is changed to

main() {int usv = 0;exit(tough((unsigned short)usv+0));}

Has anyone either traced this bug or found a more elegant workaround?

							Adam Reed
							npois!adam