casts to (void)

robert thau thau at h-sc1.UUCP
Mon Aug 5 08:50:03 AEST 1985


> 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?  

Just asking ...
-- 
Robert Thau			        \
Keeper of the *FLAME*			))
rst at tardis.ARPA			       ( (
h-sc1%thau at harvard.ARPA			\\



More information about the Comp.lang.c mailing list