diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-15 11:35:13 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-15 11:35:13 +0200 |
| commit | 7f6c22cb3d207db0937a8f67e51bee031ba47314 (patch) | |
| tree | 1433e583f322bc6ab0d67f6cf4809afd74928b73 /ext/simplexml/simplexml.c | |
| parent | 908660c1d778186f661d97c7051c8f2891e2e602 (diff) | |
| download | php-git-7f6c22cb3d207db0937a8f67e51bee031ba47314.tar.gz | |
Fix last maybe uninit warnings on 7.4
Most of these only occur under GCC 5. Not fond of all the workarounds
(especially the PDO one), but it gets us a clean build...
Diffstat (limited to 'ext/simplexml/simplexml.c')
| -rw-r--r-- | ext/simplexml/simplexml.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index b7eaf90de6..e8ba1f505a 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1016,6 +1016,7 @@ static int sxe_prop_is_empty(zval *object) /* {{{ */ zval iter_data; int test; int is_empty; + int use_iter = 0; sxe = Z_SXEOBJ_P(object); @@ -1052,6 +1053,7 @@ static int sxe_prop_is_empty(zval *object) /* {{{ */ ZVAL_COPY_VALUE(&iter_data, &sxe->iter.data); ZVAL_UNDEF(&sxe->iter.data); node = php_sxe_reset_iterator(sxe, 0); + use_iter = 1; } } @@ -1080,7 +1082,7 @@ static int sxe_prop_is_empty(zval *object) /* {{{ */ is_empty = 0; break; next_iter: - if (!Z_ISUNDEF(iter_data)) { + if (use_iter) { node = php_sxe_iterator_fetch(sxe, node->next, 0); } else { node = node->next; @@ -1088,7 +1090,7 @@ next_iter: } } - if (!Z_ISUNDEF(iter_data)) { + if (use_iter) { if (!Z_ISUNDEF(sxe->iter.data)) { zval_ptr_dtor(&sxe->iter.data); } |
