Skip to content

Commit b5abd77

Browse files
authored
[skip ci] Remove unreachable code after zend_error_noreturn calls (GH-21122)
1 parent a5a0ff6 commit b5abd77

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

Zend/zend_ast.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,6 @@ static zend_result ZEND_FASTCALL zend_ast_evaluate_inner(
11531153
if (args->children != 1 || args->child[0]->attr != ZEND_PLACEHOLDER_VARIADIC) {
11541154
/* TODO: PFAs */
11551155
zend_error_noreturn(E_COMPILE_ERROR, "Constant expression contains invalid operations");
1156-
return FAILURE;
11571156
}
11581157

11591158
switch (ast->kind) {

Zend/zend_inheritance.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2263,7 +2263,6 @@ static void zend_do_implement_interfaces(zend_class_entry *ce, zend_class_entry
22632263
if (UNEXPECTED(!(iface->ce_flags & ZEND_ACC_INTERFACE))) {
22642264
efree(interfaces);
22652265
zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ZSTR_VAL(ce->name), ZSTR_VAL(iface->name));
2266-
return;
22672266
}
22682267
for (uint32_t j = 0; j < num_interfaces; j++) {
22692268
if (interfaces[j] == iface) {

ext/zend_test/test.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ static ZEND_FUNCTION(zend_call_method)
493493
ce = zend_lookup_class(Z_STR_P(class_or_object));
494494
if (!ce) {
495495
zend_error_noreturn(E_ERROR, "Unknown class '%s'", Z_STRVAL_P(class_or_object));
496-
return;
497496
}
498497
} else {
499498
zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(class_or_object));

0 commit comments

Comments
 (0)