Skip to content

Commit 4cfc8f6

Browse files
authored
Remove dead stores from ext/spl (php#12550)
1 parent 53218b1 commit 4cfc8f6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/spl/spl_fixedarray.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ PHP_METHOD(SplFixedArray, fromArray)
740740
}
741741
spl_fixedarray_init(&array, tmp);
742742

743-
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(data), num_index, str_index, element) {
743+
ZEND_HASH_FOREACH_NUM_KEY_VAL(Z_ARRVAL_P(data), num_index, element) {
744744
ZVAL_COPY_DEREF(&array.elements[num_index], element);
745745
} ZEND_HASH_FOREACH_END();
746746

ext/spl/spl_iterators.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ PHP_METHOD(RecursiveTreeIterator, current)
11981198
}
11991199

12001200
if (object->flags & RTIT_BYPASS_CURRENT) {
1201-
zend_object_iterator *iterator = object->iterators[object->level].iterator;
1201+
zend_object_iterator *iterator;
12021202
zval *data;
12031203

12041204
SPL_FETCH_SUB_ITERATOR(iterator, object);
@@ -1920,7 +1920,7 @@ PHP_METHOD(RegexIterator, accept)
19201920
/* {{{ Returns current regular expression */
19211921
PHP_METHOD(RegexIterator, getRegex)
19221922
{
1923-
spl_dual_it_object *intern = Z_SPLDUAL_IT_P(ZEND_THIS);
1923+
spl_dual_it_object *intern;
19241924

19251925
if (zend_parse_parameters_none() == FAILURE) {
19261926
RETURN_THROWS();

0 commit comments

Comments
 (0)