Path: utzoo!utgpu!watmath!clyde!att!pacbell!ames!mailrus!csd4.milw.wisc.edu!bbn!ulowell!masscomp!ftw From: ftw@masscomp.UUCP (Farrell Woods) Newsgroups: comp.lang.c Subject: Re: lint question Message-ID: <289@masscomp.UUCP> Date: 11 Jan 89 15:36:16 GMT References: <491@babbage.acc.virginia.edu> Reply-To: ftw@quasar.UUCP (Farrell Woods) Organization: MASSCOMP - Westford, Ma Lines: 26 In article <491@babbage.acc.virginia.edu> pts@watt.acc.Virginia.EDU (Paul T. Shannon) writes: >I've been following the lint discussion, and decided it was high >time for me to use lint myself. Here's a question for style experts: >Lint complains: > >function returns value which is always ignored > fprintf printf > >Is it bad style to use these functions without also checking the >returned value? Since the printf() family of functions is writing something to somewhere, they return the number of bytes written (and -1 if they failed). If you want to ignore the return value and be in style (;-)), you can use a void cast: (void)printf(....); This signals that you are explicitly ignoring the returned value. -- Farrell T. Woods Voice: (508) 692-6200 x2471 MASSCOMP Operating Systems Group Internet: ftw@masscomp.com 1 Technology Way uucp: {backbones}!masscomp!ftw Westford, MA 01886 OS/2: Half an operating system