lint question

Doug Philips dwp at k.gp.cs.cmu.edu
Wed Jan 11 04:00:44 AEST 1989


gwyn at 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 at cs.cmu.edu                     -J.R.R. Tolkien
-- 



More information about the Comp.lang.c mailing list