Why does lint complain about this?

Joe Ramey ramey at m2.csc.ti.com
Tue Apr 25 02:38:31 AEST 1989


When I run lint on this program

main()
{
  try(0);
}

try(foo)
char *foo;
{
}

I get this output:

trylint.c:
trylint.c(7): warning: argument foo unused in function try
try, arg. 1 used inconsistently	trylint.c(8)  ::  trylint.c(3)

Why does lint say that the arg. is used inconsistently?  I thought
that zero could be assigned to any pointer type.  Shouldn't lint
recognize the constant 0 and realize that it is compatible with (char *) ?

Joe Ramey (ti-csl!ramey , ramey at csc.ti.com)
TI Computer Science Center



More information about the Comp.lang.c mailing list