Microport Unix -- Large Model Problems

Guy Harris guy at sun.uucp
Thu Nov 6 06:35:44 AEST 1986


> To get *all* the right things, we use:
> 
> 	#ifdef	lint
> 	#   define	null	0
> 	#else
> 	#   define	null	(char *)0
> 	#endif
> 
> since lint doesn't understand that comparing an (int *) variable with a
> (char *)0 is legitimate.

If you use that particular construct, you will get a lot of perfectly
legitimate "lint" complaints about argument mismatches when you pass a
"null" to a routine that expects a pointer of some sort.  Since, given the
rationale for this construct, you presumably want to keep "lint" as quiet as
possible, you presumably then cast "null" to the appropriate type.  Given
that, what does the non-"lint" arm of the conditional buy you, other than
fixing up a few calls to things like "execl", which are easy enough to fix
manually with casts?
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy at sun.com (or guy at sun.arpa)



More information about the Comp.unix.wizards mailing list