From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,35629eebe01bcdaf X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: About to give up... Date: 1998/08/08 Message-ID: #1/1 X-Deja-AN: 379102242 Sender: matt@mheaney.ni.net References: <6qbt86$dh$1@nnrp1.dejanews.com> <6qcblu$f60$1@nnrp1.dejanews.com> <6qeb1u$728$1@nnrp1.dejanews.com> NNTP-Posting-Date: Sat, 08 Aug 1998 00:35:23 PDT Newsgroups: comp.lang.ada Date: 1998-08-08T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) writes: > In fact the ease of accidentally ignoring returned values is one of the > great weaknesses in C. C almost invites programs to avoid taking the > effort to deal with error indications. > > If you *do* want to completely ignore returned result, I find a useful > notation to be > > Discard (func (params)); > > where Discard is an inlined null procedure that ignores its parameter. One thing you can do in C is to explicitly cast away the return value (void) func (params); This at least tells your reader that you didn't accidently ignore the return value.