aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-12-01 22:33:47 +0200
committerArnold D. Robbins <arnold@skeeve.com>2021-12-01 22:33:47 +0200
commit4285d605b8c0cbe4e0b15724af1b4bd223f25403 (patch)
tree3df43024ff1f53d5f6b597a15a74f708593e06d7
parent9eb357e008385176a44b695e6117f95b2ea104a7 (diff)
downloadegawk-4285d605b8c0cbe4e0b15724af1b4bd223f25403.tar.gz
egawk-4285d605b8c0cbe4e0b15724af1b4bd223f25403.tar.bz2
egawk-4285d605b8c0cbe4e0b15724af1b4bd223f25403.zip
Don't use return in a call to a void function.
-rw-r--r--ChangeLog9
-rw-r--r--builtin.c4
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b5b21bac..daba4ea9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/builtin.c b/builtin.c
index cc17a42f..766f7ceb 100644
--- a/builtin.c
+++ b/builtin.c
@@ -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);
}
}