Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2024-01-19 13:13:39 +0300
committerCorinna Vinschen <corinna@vinschen.de>2024-01-19 13:13:39 +0300
commitd13d9220bf47f7e91b02c5c8e214780bda840606 (patch)
tree48411580712005c8d7512807cc2e2de4408cf1c4 /newlib
parentd45261f62a15f8abd94a1031020b9a9f455e4eed (diff)
_fputwc_r: actually return result of __fputwc
Compiling with -Wall uncovered a bug in _fputwc_r introduced in commit 09119463a1445 ("stdio: split byte- and wide-char-oriented low-level output functions"). The underlying function __fputwc has been accidentally called without fetching its return value. So the return value of _fputwc_r (and thus fputwc) was undefined. Fixes: 09119463a1445 ("stdio: split byte- and wide-char-oriented low-level output functions" Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libc/stdio/fputwc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/stdio/fputwc.c b/newlib/libc/stdio/fputwc.c
index 8430446de..12a6170bb 100644
--- a/newlib/libc/stdio/fputwc.c
+++ b/newlib/libc/stdio/fputwc.c
@@ -169,7 +169,7 @@ _fputwc_r (struct _reent *ptr,
wint_t r;
_newlib_flockfile_start (fp);
- __fputwc(ptr, wc, fp);
+ r = __fputwc(ptr, wc, fp);
_newlib_flockfile_end (fp);
return r;
}