summaryrefslogtreecommitdiff
path: root/libc/stdio
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2017-01-14 12:07:48 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2017-01-14 18:31:49 +0100
commit88b5d9c6ea420dedf23238a952ac117cd7d5a7c1 (patch)
tree4a9bab47a653b15c67d844ce049d9fc9fc5b147a /libc/stdio
parent783d7405385ece1698601019d8220aff8082865b (diff)
fix gcc compiler warning
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/_stdio.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h
index 974327d82..85464fa42 100644
--- a/libc/stdio/_stdio.h
+++ b/libc/stdio/_stdio.h
@@ -112,13 +112,14 @@ do { \
#define __STDIO_STREAM_CUSTOM_WRITE_FUNC(S, ARGS...) \
if (__STDIO_STREAM_IS_CUSTOM((S))) { \
+ ssize_t w; \
_IO_cookie_file_t *cfile = (_IO_cookie_file_t *) (S); \
if (cfile->__gcs.write == NULL) { \
__set_errno(EINVAL); \
return -1; \
} \
__set_errno(EAGAIN); \
- ssize_t w = cfile->__gcs.write(cfile->__cookie, ##ARGS); \
+ w = cfile->__gcs.write(cfile->__cookie, ##ARGS); \
return (w == 0 ? -1 : w); \
}