Discarded Function Values (To Cast or Not to Cast)

Michael T. Sullivan sullivan at aqdata.uucp
Sat Nov 18 02:46:21 AEST 1989


>From article <316 at voa3.UUCP>, by ck at voa3.UUCP (Chris Kern):
> ...  Should I cast the function
> call to void, or am I just indulging in the trivial luxury of
> silencing lint?

Although you are merely silencing lint, you are also doing yourself
a service.  If you start letting warnings like "return value ignored"
pop up then you will someday miss an real warning/error message that
is buried amongst the "fake" warning/error messages.  Silence as many
lint warnings as you can (will somebody PLEASE do something about the
malloc bugaboo) and the real ones will stand out easily.
-- 
Michael Sullivan          uunet!jarthur.uucp!aqdata!sullivan
aQdata, Inc.
San Dimas, CA



More information about the Comp.lang.c mailing list