diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2021-12-01 22:33:47 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2021-12-01 22:33:47 +0200 |
commit | 4285d605b8c0cbe4e0b15724af1b4bd223f25403 (patch) | |
tree | 3df43024ff1f53d5f6b597a15a74f708593e06d7 | |
parent | 9eb357e008385176a44b695e6117f95b2ea104a7 (diff) | |
download | egawk-4285d605b8c0cbe4e0b15724af1b4bd223f25403.tar.gz egawk-4285d605b8c0cbe4e0b15724af1b4bd223f25403.tar.bz2 egawk-4285d605b8c0cbe4e0b15724af1b4bd223f25403.zip |
Don't use return in a call to a void function.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | builtin.c | 4 |
2 files changed, 10 insertions, 3 deletions
@@ -1,11 +1,18 @@ +2021-12-01 Arnold D. Robbins <arnold@skeeve.com> + + * builtin.c (efflush): Don't use return in call of function + returning void. It works, but is funky, and I think some + compilers will complain. + 2021-11-30 Andrew J. Schorr <aschorr@telemetry-investments.com> Improve output redirection error handling for problems not detected until the final flush or close. Thanks to Miguel Pineiro Jr. <mpj@pineiro.cc> for the bug report and suggesting a fix. + * awk.h (efflush): Add declaration. * builtin.c (efwrite): Break up into 3 functions by moving the - flushing logic into efflush and the error handling loginc into + flushing logic into efflush and the error handling logic into wrerror. (wrerror): New function containing the error-handling logic extracted from efwrite. @@ -132,11 +132,11 @@ efflush(FILE *fp, const char *from, struct redirect *rp) if (rp != NULL) { rp->output.gawk_fflush(fp, rp->output.opaque); if (rp->output.gawk_ferror(fp, rp->output.opaque)) - return wrerror(fp, from, rp); + wrerror(fp, from, rp); } else { fflush(fp); if (ferror(fp)) - return wrerror(fp, from, rp); + wrerror(fp, from, rp); } } |