diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2021-12-02 09:14:22 -0500 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2021-12-02 09:14:22 -0500 |
commit | 7d8a75a766b17fe395c0a82050d314c2dea57f3e (patch) | |
tree | 73bbb9f6255684bf69e12b80af622fc7a4a965a4 | |
parent | f77e1318c515d495ac9c08bdfdf2dadf79a9649f (diff) | |
download | egawk-7d8a75a766b17fe395c0a82050d314c2dea57f3e.tar.gz egawk-7d8a75a766b17fe395c0a82050d314c2dea57f3e.tar.bz2 egawk-7d8a75a766b17fe395c0a82050d314c2dea57f3e.zip |
Don't use return in a call to a void function.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | builtin.c | 12 |
2 files changed, 13 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2021-12-02 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * builtin.c (efwrite): Don't use return in call of function + returning void. Some compilers might not like it. + 2021-12-01 Arnold D. Robbins <arnold@skeeve.com> * builtin.c (efflush): Don't use return in call of function @@ -151,10 +151,14 @@ efwrite(const void *ptr, { errno = 0; if (rp != NULL) { - if (rp->output.gawk_fwrite(ptr, size, count, fp, rp->output.opaque) != count) - return wrerror(fp, from, rp); - } else if (fwrite(ptr, size, count, fp) != count) - return wrerror(fp, from, rp); + if (rp->output.gawk_fwrite(ptr, size, count, fp, rp->output.opaque) != count) { + wrerror(fp, from, rp); + return; + } + } else if (fwrite(ptr, size, count, fp) != count) { + wrerror(fp, from, rp); + return; + } if (flush && ((fp == stdout && output_is_tty) || (rp != NULL && (rp->flag & RED_NOBUF) != 0))) |