Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!jarthur!ucivax!zardoz.cpd.com!dhw68k!felix!asylvain From: asylvain@felix.UUCP (Alvin E. Sylvain) Newsgroups: comp.lang.c Subject: Re: Why use (void) func() ? (lint beef) Summary: I don't like lint Message-ID: <151806@felix.UUCP> Date: 1 Oct 90 23:42:05 GMT References: <586@dptechno.UUCP> <1990Sep24.193012.14074@diku.dk> <12141@crdgw1.crd.ge.com> Sender: daemon@felix.UUCP Reply-To: asylvain@felix.UUCP (Alvin E. Sylvain) Organization: FileNet Corp., Costa Mesa, CA Lines: 39 In article <12141@crdgw1.crd.ge.com> volpe@underdog.crd.ge.com (Christopher R Volpe) writes: >I wouldn't mind it if lint warned about *my* functions that I declare >with a return value which I *sometimes* ignore. That makes sense, because >I rarely define functions whose return values I am interested in only >sometimes. What I do mind is when lint warns me about return values from >printf being ignored, which I, as well as most people, routinely ignore. >Our dain-bramaged lint does the annoying thing in both circumstances: >It fails to warn about ignored return values from *my* routines, and >always warns about ignored return values from printf and scanf! >================== >Chris Volpe >G.E. Corporate R&D >volpecr@crd.ge.com I agree with this assessment of lint, and I'd like to open the floor to opinions in that area. I believe this is the main bone of contention here. IMHO, lint is a good idea, but it is usually so durnedably verbose that I'd rather not bother. It's a matter (as expressed above) of reporting problems one could just as well not hear about. Any tool which annoys the user to the point of not using it is less than useless ... the benefits are wasted. In the case of lint, real problems can remain uncovered, only to bite you during testing, maintenance, or (ye gads!) customer operation. Anyone else out there feel this way? Any thoughts toward a version of lint that's a little less "mother-hen", but still tells you what you need to know? Maybe we could program it with "ignore the following problems with the following functions" instructions. (BTW, even if you never check printf, IMAO you should *always* check scanf. Your output may be 99% reliable if the file was opened successfully, but your input is *always* suspicious, no matter what the source.) -- ------------------------------------------------------------------------ "I got protection for my | Alvin "the Chipmunk" Sylvain affections, so swing your | Natch, nobody'd be *fool* enough to have bootie in my direction!" | *my* opinions, 'ceptin' *me*, of course! -=--=--=--"BANDWIDTH?? WE DON'T NEED NO STINKING BANDWIDTH!!"--=--=--=-