Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!xylogics!bu.edu!mirror!necntc!necssd!harrison From: harrison@necssd.NEC.COM (Mark Harrison) Newsgroups: comp.lang.c Subject: Re: why "(void)printf(fmt);" besides lint(1)? Message-ID: <362@necssd.NEC.COM> Date: 1 Jun 90 17:07:55 GMT References: <7486@ncar.ucar.edu> <1990May27.001120.13623@utzoo.uucp> Organization: NEC America Inc. SSD, Irving, TX Lines: 24 In article <1990May27.001120.13623@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes: > In article <7486@ncar.ucar.edu> steve@groucho.ucar.edu (Steve Emmerson) writes: > >Aside from getting lint(1) to shut up, why else would one write > > (void)printf(fmt); > >rather than the simpler > > printf(fmt); > Personally, this is one of the few places where I just refuse to use the > cast. I consider it pointless clutter. If lint objects, tough. I agree. One of the nice things about using {PC,Flexe}Lint from Gimpel Software is that you can selectively turn off/on specific checks for specific functions (i.e. "Don't tell me when I ignore the return value from printf."). They put the fun back into running lint! :-) If you would like more information, their number is (215)584-4261. Tell them I sent you and they'll treat you right ;-). -- Mark Harrison harrison@necssd.NEC.COM (214)518-5050 {necntc, cs.utexas.edu}!necssd!harrison standard disclaimers apply...