Shawn Walker wrote: > For a lint warning such as the following regarding fclose: > > warning: function returns value which is always ignored: fclose > (E_FUNC_RET_ALWAYS_IGNOR2) > > ..where the code is something like: > > fclose(fp); > > I have seen two "solutions" to this, one which strikes me as the > "quick solution": [snip] > What is the "preferred" solution?
AFAIK the usual rule is that |fclose()| used on files for reading doesn't need to be checked while |fclose()| on files opened for writing is more or less mandatory since |fclose()| may flush buffers and trigger a write to the disk which may fail. ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [EMAIL PROTECTED] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code