Question about LINT

robison at uiucdcsb.CS.UIUC.EDU robison at uiucdcsb.CS.UIUC.EDU
Tue Apr 15 03:30:00 AEST 1986


>     If one has a function which is sometimes called as a procedure
> (ignoring returned value) is there a way to tell lint not to
> complain about this?

Cast the result to (void) when you call the function as a procedure, i.e.
	
	int foo (x)
	   int x;
	   {
	      return x;
	   }   
	
	main ()
	   {
	      (void) foo (2);
	   }

Arch D. Robison



More information about the Comp.lang.c mailing list