Browse Source

fix gcc compiler warning

Waldemar Brodkorb 7 years ago
parent
commit
88b5d9c6ea
1 changed files with 2 additions and 1 deletions
  1. 2 1
      libc/stdio/_stdio.h

+ 2 - 1
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); \
  }