Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!Purtill@MIT-MULTICS.ARPA
From: Purtill@MIT-MULTICS.ARPA (Mark Purtill)
Newsgroups: net.lang.c
Subject: Re: casts to void
Message-ID: <484@brl-tgr.ARPA>
Date: Tue, 6-Aug-85 20:10:00 EDT
Article-I.D.: brl-tgr.484
Posted: Tue Aug  6 20:10:00 1985
Date-Received: Sun, 11-Aug-85 00:16:28 EDT
Sender: news@brl-tgr.ARPA
Lines: 25


>The printf() function CAN FAIL and if you don't test for it,
>Murphy says that it WILL fail, under the worst possible
>circumstances (e.g., while updating YOUR pay record).
>Instead of looking for ways to avoid testing printf return,
>how about making your code more robust.

Come on.  What are you going to do about it if printf fails?  Especially
if you know you're writing to the terminal, in which case you can't
write an error message, either.  You want us to write:

main( ) {
          if( printf( "Hello, world\n") < 0) {
                    exit( -1) ; /* Ooops, can't write to terminal... */
                    }
          }

Personally, I think there ought to be a standard way to tell all or some
of the library functions that if they get an error, they should just
print an error message and die, 'cause usually that's all I'm going to
do anyway (and usually won't.)

       Mark
^.-.^  Purtill at MIT-MULTICS.ARPA    **Insert favorite disclaimer here**
(("))  2-032 MIT Cambrige MA 02139