lint and (void)printf

rs at mirror.UUCP rs at mirror.UUCP
Wed Aug 14 23:58:00 AEST 1985




(The original article came in as an "Orphaned Response," and since I
 run notes...)

If you don't want to clutter up your code with casting *printf results
to void, then just change the lint library specification so that these
functions don't return a value.  If you're paranoid, you can put it in
a different library so that people say, e.g., -lcareless in their
command line.  In particular, I strongly recommend that you do this
for sprintf() in the standard library to catch anyone who tries to use
the "return value" -- in BSD and USG they're very, very different!

--
Rich $alz	{mit-eddie, ihnp4!inmet, wjh12, cca, datacube} !mirror!rs
Mirror Systems	2067 Massachusetts Ave.
617-661-0777	Cambridge, MA, 02140



More information about the Comp.unix.wizards mailing list