com php-src: fix warnings: ext/iconv/iconv.c
| From: | Michael Wallner | Date: | Fri, 30 Jan 2015 19:04:04 +0000 |
| Subject: | com php-src: fix warnings: ext/iconv/iconv.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84472@lists.php.net to get a copy of this message | ||
Commit: b72b4084a5fca22a195720441cdd15ad2c767a5c
Author: Michael Wallner <mike@php.net> Fri, 30 Jan 2015 20:04:04 +0100
Parents: f6508f9fa2b10747c4176c007cbe4e14297c09a3
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b72b4084a5fca22a195720441cdd15ad2c767a5c
Log:
fix warnings
Changed paths:
M ext/iconv/iconv.c
Diff:
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 486f65d..b9fb10b 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -1338,7 +1338,9 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char
*fn
ini_in_p = in_p;
for (out_size = (char_cnt - 2) / 3; out_size > 0;) {
+#if !ICONV_SUPPORTS_ERRNO
size_t prev_out_left;
+#endif
nbytes_required = 0;
@@ -1374,8 +1376,9 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char
*fn
}
#endif
}
-
+#if !ICONV_SUPPORTS_ERRNO
prev_out_left = out_left;
+#endif
if (iconv(cd, NULL, NULL, (char **) &out_p, &out_left) == (size_t)-1) {
#if ICONV_SUPPORTS_ERRNO
if (errno != E2BIG) {