Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp
Path: utzoo!linus!decvax!decwrl!sun!guy
From: guy@sun.uucp (Guy Harris)
Newsgroups: net.lang.c
Subject: Re: casts to (void) [considered harmful]
Message-ID: <2564@sun.uucp>
Date: Tue, 6-Aug-85 01:39:47 EDT
Article-I.D.: sun.2564
Posted: Tue Aug  6 01:39:47 1985
Date-Received: Wed, 7-Aug-85 04:24:36 EDT
References: <11@brl-tgr.ARPA> <> <168@telesoft.UUCP> <493@h-sc1.UUCP>
Organization: Sun Microsystems, Inc.
Lines: 20

> printf() is invariably used as a formatted-output statement,
> not as a value-returning function.

"invariably"?  Wrong.  The S5R2 "ls" uses the return value from "printf"
(which is the number of characters printed) to do its columnation.  I'm sure
there are other examples out there.

> DOWN WITH LINT SALAD!!!

It's unfortunate that so much effort has to be wasted on silencing harmless
"lint" complaints, but as anybody who's tried porting code to machines which
don't fit the VAX model of the world (32-bit "int"s, 32-bit pointers, signed
characters, little-endian byte order, etc.) will tell you, better to run
"lint" on the code and either spend the effort (void)ing everything or
filtering out the harmless complaints than to spend the effort on several
extra compile/run/debug/edit/compile... cycles fixing the problems caused by
code that assumes that model of the world.  (I've done it; I know whereof I
speak.)

	Guy Harris