Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 exptools; site ihuxe.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!lll-crg!dual!qantel!ihnp4!ihuxe!foss
From: foss@ihuxe.UUCP (foss)
Newsgroups: net.lang.c
Subject: Re: casts to (void)
Message-ID: <1206@ihuxe.UUCP>
Date: Tue, 6-Aug-85 08:46:15 EDT
Article-I.D.: ihuxe.1206
Posted: Tue Aug  6 08:46:15 1985
Date-Received: Mon, 12-Aug-85 00:16:22 EDT
References: <11@brl-tgr.ARPA> <1288@eagle.UUCP> <15908@watmath.UUCP> <116@rtp47.UUCP> <1096@diku.UUCP> <413@brl-tgr.ARPA> <498@h-sc1.UUCP>
Organization: AT&T Bell Laboratories
Lines: 20

> > The people proposing ways of making
> > 	(void)printf( ... );
> > easier to enter into their code are missing the point of lint's
> > complaint!
> > 
> > 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.
> 
> I just checked the manual page on printf(3), both on this machine (2.xbsd),
> and on one of the local vaxen (4.2bsd, with local hacks).  Neither documents
> a return value for printf, under normal or erroneous circumstances.  How does
> one check?  


The subroutine printf(3) calls the system call write(2).
If sucessful, the return value is set to the number of characters 
written, else -1 is returned and errno is set to describe the error.