Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watmath.UUCP Path: utzoo!watmath!atbowler From: atbowler@watmath.UUCP (Alan T. Bowler [SDG]) Newsgroups: net.lang.c Subject: Re: Question about LINT Message-ID: <2155@watmath.UUCP> Date: Wed, 16-Apr-86 07:27:03 EST Article-I.D.: watmath.2155 Posted: Wed Apr 16 07:27:03 1986 Date-Received: Thu, 17-Apr-86 01:18:29 EST References: <5000041@inmet> <139200026@uiucdcsb> Reply-To: atbowler@watmath.UUCP (Alan T. Bowler [SDG]) Organization: U of Waterloo, Ontario Lines: 19 Summary: In article <139200026@uiucdcsb> robison@uiucdcsb.CS.UIUC.EDU writes: > >> If one has a function which is sometimes called as a procedure >> (ignoring returned value) is there a way to tell lint not to >> complain about this? > >Cast the result to (void) when you call the function as a procedure, i.e. > The problem with this is that you end up with very cluttered code especially with routines like STRCPY whose return value is seldom used. With the usual Unix LINT there is not much you can do about this. The Lint supplied with C on the Honeywell DPS-8 (the one you get from Honeywell, not the Bell Labs C6000 (PCC) one), there is a directive to LINT that you attach to the function definition that defines it as a function with an optional result. I.e. you only put this in 1 place, namely where you define the code for the function. If this is done, LINT will not complain about ignoring the result of the particular function.