Xref: utzoo comp.unix.xenix:2648 comp.lang.c:11265
Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!mit-eddie!ll-xn!ames!lll-tis!oodis01!uplherc!sp7040!obie!wes
From: wes@obie.UUCP (Barnacle Wes)
Newsgroups: comp.unix.xenix,comp.lang.c
Subject: Re: lint on Altos 2000 is BROKE BROKE BROKE!
Summary: Try type castings the std{in, out, err} definitions.
Message-ID: <94@obie.UUCP>
Date: 9 Jul 88 18:16:36 GMT
References: <256@oglvee.UUCP> <8173@brl-smoke.ARPA> <259@oglvee.UUCP> <261@oglvee.UUCP>
Organization: the Well of Souls
Lines: 30

In article <261@oglvee.UUCP>, jr@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 --