Path: utzoo!attcan!uunet!lll-winken!ncis!helios.ee.lbl.gov!nosc!ucsd!ucbvax!decwrl!purdue!bu-cs!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: lint question Message-ID: <1927@buengc.BU.EDU> Date: 19 Jan 89 17:24:31 GMT References: <491@babbage.acc.virginia.edu> <1188@dukeac.UUCP> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.lang.c Organization: Boston Univ. Col. of Eng. Lines: 17 In article <1188@dukeac.UUCP> bet@dukeac.UUCP (Bennett Todd) writes: >*All* possible error routines should be checked, with only one exception that >I know of: > > if (fatal failure) { > (void) fprintf(stderr, "suitable error message"); > exit(error_level); > } > >There's no point in checking for an error writing to stderr, since you >couldn't report it anyway, and all you are going to do is exit. Howsabout if the poor return from fprintf indicates that stderr is missing, and you therefore specify logging the unreportable errors to a file? --Blair