Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site eagle.UUCP Path: utzoo!watmath!clyde!burl!ulysses!eagle!mjs From: mjs@eagle.UUCP (M.J.Shannon) Newsgroups: net.lang.c Subject: Re: casts to (void) Message-ID: <1310@eagle.UUCP> Date: Mon, 5-Aug-85 08:54:43 EDT Article-I.D.: eagle.1310 Posted: Mon Aug 5 08:54:43 1985 Date-Received: Tue, 6-Aug-85 08:54:41 EDT References: <11@brl-tgr.ARPA> <1288@eagle.UUCP> <15908@watmath.UUCP> <116@rtp47.UUCP> <1096@diku.UUCP> Organization: AT&T Bell Laboratories, Summit, NJ Lines: 34 > In article <116@rtp47.UUCP> meissner@rtp47.UUCP (Michael Meissner) writes: > > > >Whenever I use things like printf with lint, I define things like: > > > > #define Printf (void) printf > > #define Fputs (void) fputs > > > > /* ... */ > > > > Printf("Hello World!\n"); > > > >Which translates to: > > > > (void) printf("Hello World!\n"); > > > >Thus lint is kept happy, and my program is not cluttered up with casts to void. > > That's a mediocre solution, it shouldn't be necessary lint should know the > set of standard functions which results needn't be used. It's not accept- > able to either put (void) in front of printf(), scanf(), ...etc. or make > defines like "#define Printf (void) printf". > > Regards > Kim Chr. Madsen > a.k.a. kimcm@diku.uucp And programs that do this don't recover from write errors, like when a filesystem runs out of space. That's what lint *correctly* complains about. -- Marty Shannon UUCP: ihnp4!eagle!mjs Phone: +1 201 522 6063 Warped people are throwbacks from the days of the United Federation of Planets.