Suppress -Wunused-result warnings about write() and fwrite().
Tom Lane <tgl@sss.pgh.pa.us>
Suppress -Wunused-result warnings about write() and fwrite(). This is merely an exercise in satisfying pedants, not a bug fix, because in every case we were checking for failure later with ferror(), or else there was nothing useful to be done about a failure anyway. Document the latter cases.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +4 −2 |
| src/backend/commands/copy.c | modified | +3 −3 |
| src/backend/postmaster/pgstat.c | modified | +11 −5 |
| src/backend/utils/error/elog.c | modified | +32 −6 |
| src/bin/psql/common.c | modified | +9 −3 |