lint on Altos 2000 is BROKE BROKE BROKE!

Barnacle Wes wes at obie.UUCP
Sun Jul 10 04:16:36 AEST 1988


In article <261 at oglvee.UUCP>, jr at oglvee.UUCP (Jim Rosenberg) writes:
  [Relates how lint is complaining about stdin on his system.  The
  relevant portion of stdio.h is:

> #define	FILE	struct _iobuf
> 
> #define	stdin	(&_iob[0])
> #define	stdout	(&_iob[1])
> #define	stderr	(&_iob[2])
> 
> Boy this is pretty strange.  The #ifndef FILE is not the problem; when I get
> rid of that lint still gives me the same complaint.  I tried replacing the
> #define for FILE with a typedef struct _iobuf FILE; -- still the same result.
> It does seem here that lint itself is genuinely a bit off its rocker.

Try type casting the definitions, like thus:

#define	stdin	((FILE *)&_iob[0])
#define	stdout	((FILE *)&_iob[1])
#define	stderr	((FILE *)&_iob[2])

This should cure your lint problem whithout screwing anything else up (I
hope :-).  BTW, my (Microport) System V stdio.h is just like your
original, and lint likes it OK.  Maybe you did get the lint from the
Dead Sea Tapes.
-- 
                     {hpda, uwmcsd1}!sp7040!obie!wes
           "Happiness lies in being priviledged to work hard for
           long hours in doing whatever you think is worth doing."
                         -- Robert A. Heinlein --



More information about the Comp.lang.c mailing list