Discarded Function Values (To Cast or Not to Cast)

Jeffrey Kegler jeffrey at algor2.algorists.com
Mon Nov 20 23:13:26 AEST 1989


In article <11644 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>In article <1989Nov18.062322.12728 at twwells.com> bill at twwells.com (T. William Wells) writes:
>>I don't worry about lint warnings about functions whose return
>>value is never used. It is generally a very short list, ...
>
>If it isn't a problem for you, more power to you.
>I find that I am less likely to overlook genuine problems
>reported by "lint" if NO lint output is expected than if
>SOME lint output is expected.  This is difficult to enforce
>when malloc() is involved, although there are ways.

I always make lint produce silent output, even when writing device
drivers.  Even if you can remember which lint messages are harmless,
someone inheriting your code has to examine them all, or ignore them
all.  And a few months later, if lint produces 7 messages instead of
6, I do not feel all that sure that 7th would catch my attention.  One
instead of zero, I will notice.
-- 

Jeffrey Kegler, Independent UNIX Consultant, Algorists, Inc.
jeffrey at algor2.ALGORISTS.COM or uunet!algor2!jeffrey
1762 Wainwright DR, Reston VA 22090



More information about the Comp.lang.c mailing list