Path: utzoo!utgpu!watmath!att!rutgers!ucsd!usc!cs.utexas.edu!uunet!voa3!ck From: ck@voa3.UUCP (Chris Kern) Newsgroups: comp.lang.c Subject: Discarded Function Values (To Cast or Not to Cast) Message-ID: <316@voa3.UUCP> Date: 16 Nov 89 18:58:51 GMT Reply-To: ck@voa3.UUCP (Chris Kern) Organization: Voice of America, Washington, D.C. Lines: 16 I suspect this is not a novel inquiry, but I can't remember any previous discussion. . . . My compiler (pcc) is agnostic about discarding the value from a function call. Lint, of course, protests. If it's my function, I presumably will declare it to be void if it doesn't return a value and will use the value if it does return one. But what about a standard library function whose value I (perhaps recklessly) wish to ignore? Should I cast the function call to void, or am I just indulging in the trivial luxury of silencing lint? -- Chris Kern Voice of America, Washington, D.C. ...uunet!voa3!ck +1 202-485-7020