Path: utzoo!attcan!uunet!lll-winken!ames!nrl-cmf!ukma!cwjcc!gatech!udel!rochester!pt.cs.cmu.edu!k.gp.cs.cmu.edu!dwp From: dwp@k.gp.cs.cmu.edu (Doug Philips) Newsgroups: comp.lang.c Subject: Re: lint question Keywords: return values ignorable Message-ID: <3993@pt.cs.cmu.edu> Date: 10 Jan 89 18:00:44 GMT References: <491@babbage.acc.virginia.edu> <9322@smoke.BRL.MIL> Organization: Carnegie-Mellon University, CS/RI Lines: 19 gwyn@smoke.BRL.MIL (Doug Gwyn ) writes: :Note the use of a (void) cast to explicitly discard an unused :function value. This should not be done lightly; if properly used, :it indicates that the programmer realized that the function returns :a value but that it is not necessary in this particular instance to :use the value. This will shut lint up, but that should not be the :prime motivation for using the cast! Actually, my prime motivation for using it IS to shut up lint. Strcpy and strcat return values that I almost never care about. Lint doesn't understand the "return value for the convenience of sometimes having it" notion. Perhaps this is a candidate for another SLM like 'vstrcat'?? ;-) -- Doug Philips "All that is gold does not glitter, Carnegie-Mellon University Not all those who wander are lost..." dwp@cs.cmu.edu -J.R.R. Tolkien --