From 88b5d9c6ea420dedf23238a952ac117cd7d5a7c1 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 14 Jan 2017 12:07:48 +0100 Subject: fix gcc compiler warning --- libc/stdio/_stdio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); \ } -- cgit v1.2.3