mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Introduce pseudo-keyword ZEND_FALLTHROUGH
And use it instead of comments
This commit is contained in:
parent
8a86fe11da
commit
5caaf40b43
88 changed files with 268 additions and 155 deletions
|
@ -399,7 +399,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
|
||||||
Tsource[VAR_NUM(opline->op1.var)] = NULL;
|
Tsource[VAR_NUM(opline->op1.var)] = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case ZEND_IS_EQUAL:
|
case ZEND_IS_EQUAL:
|
||||||
case ZEND_IS_NOT_EQUAL:
|
case ZEND_IS_NOT_EQUAL:
|
||||||
|
@ -1037,7 +1037,7 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array, zend_op
|
||||||
break;
|
break;
|
||||||
case ZEND_JMPZNZ:
|
case ZEND_JMPZNZ:
|
||||||
opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, new_opcodes + blocks[b->successors[1]].start);
|
opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, new_opcodes + blocks[b->successors[1]].start);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMPZ:
|
case ZEND_JMPZ:
|
||||||
case ZEND_JMPNZ:
|
case ZEND_JMPNZ:
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
|
|
|
@ -466,7 +466,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
|
||||||
map[i] = l_empty_arr;
|
map[i] = l_empty_arr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
/* don't merge other types */
|
/* don't merge other types */
|
||||||
map[i] = j;
|
map[i] = j;
|
||||||
|
|
|
@ -385,7 +385,7 @@ static inline bool is_free_of_live_var(context *ctx, zend_op *opline, zend_ssa_o
|
||||||
if (!(ctx->ssa->var_info[ssa_op->op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))) {
|
if (!(ctx->ssa->var_info[ssa_op->op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_FE_FREE:
|
case ZEND_FE_FREE:
|
||||||
return !is_var_dead(ctx, ssa_op->op1_use);
|
return !is_var_dead(ctx, ssa_op->op1_use);
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -613,7 +613,7 @@ static void zend_ssa_replace_control_link(zend_op_array *op_array, zend_ssa *ssa
|
||||||
if (ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) == old->start) {
|
if (ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) == old->start) {
|
||||||
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, dst->start);
|
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, dst->start);
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMPZ:
|
case ZEND_JMPZ:
|
||||||
case ZEND_JMPNZ:
|
case ZEND_JMPNZ:
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
|
|
|
@ -59,7 +59,7 @@ static void zend_delete_call_instructions(zend_op *opline)
|
||||||
MAKE_NOP(opline);
|
MAKE_NOP(opline);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_NEW:
|
case ZEND_NEW:
|
||||||
case ZEND_INIT_DYNAMIC_CALL:
|
case ZEND_INIT_DYNAMIC_CALL:
|
||||||
case ZEND_INIT_USER_CALL:
|
case ZEND_INIT_USER_CALL:
|
||||||
|
@ -178,7 +178,7 @@ void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
|
||||||
ctx->script, op_array, opline, &call_stack[call].is_prototype);
|
ctx->script, op_array, opline, &call_stack[call].is_prototype);
|
||||||
call_stack[call].try_inline =
|
call_stack[call].try_inline =
|
||||||
!call_stack[call].is_prototype && opline->opcode != ZEND_NEW;
|
!call_stack[call].is_prototype && opline->opcode != ZEND_NEW;
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_INIT_DYNAMIC_CALL:
|
case ZEND_INIT_DYNAMIC_CALL:
|
||||||
case ZEND_INIT_USER_CALL:
|
case ZEND_INIT_USER_CALL:
|
||||||
call_stack[call].opline = opline;
|
call_stack[call].opline = opline;
|
||||||
|
|
|
@ -592,7 +592,7 @@ static inline int ct_eval_assign_dim(zval *result, zval *value, zval *key) {
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
case IS_FALSE:
|
case IS_FALSE:
|
||||||
array_init(result);
|
array_init(result);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case IS_ARRAY:
|
case IS_ARRAY:
|
||||||
case PARTIAL_ARRAY:
|
case PARTIAL_ARRAY:
|
||||||
return ct_eval_add_array_elem(result, value, key);
|
return ct_eval_add_array_elem(result, value, key);
|
||||||
|
@ -695,7 +695,7 @@ static inline int ct_eval_assign_obj(zval *result, zval *value, zval *key) {
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
case IS_FALSE:
|
case IS_FALSE:
|
||||||
empty_partial_object(result);
|
empty_partial_object(result);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case PARTIAL_OBJECT:
|
case PARTIAL_OBJECT:
|
||||||
return ct_eval_add_obj_prop(result, value, key);
|
return ct_eval_add_obj_prop(result, value, key);
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -314,6 +314,7 @@ ZEND_API int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, u
|
||||||
break;
|
break;
|
||||||
case ZEND_INCLUDE_OR_EVAL:
|
case ZEND_INCLUDE_OR_EVAL:
|
||||||
flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS;
|
flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_GENERATOR_CREATE:
|
case ZEND_GENERATOR_CREATE:
|
||||||
case ZEND_YIELD:
|
case ZEND_YIELD:
|
||||||
case ZEND_YIELD_FROM:
|
case ZEND_YIELD_FROM:
|
||||||
|
|
|
@ -195,7 +195,7 @@ add_op1_def:
|
||||||
if (!zend_bitset_in(def, var_num)) {
|
if (!zend_bitset_in(def, var_num)) {
|
||||||
zend_bitset_incl(use, var_num);
|
zend_bitset_incl(use, var_num);
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_INIT_ARRAY:
|
case ZEND_INIT_ARRAY:
|
||||||
if (((build_flags & ZEND_SSA_RC_INFERENCE)
|
if (((build_flags & ZEND_SSA_RC_INFERENCE)
|
||||||
|| (opline->extended_value & ZEND_ARRAY_ELEMENT_REF))
|
|| (opline->extended_value & ZEND_ARRAY_ELEMENT_REF))
|
||||||
|
|
|
@ -4474,7 +4474,7 @@ ZEND_API int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op,
|
||||||
/* Division by zero */
|
/* Division by zero */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_SUB:
|
case ZEND_SUB:
|
||||||
case ZEND_MUL:
|
case ZEND_MUL:
|
||||||
case ZEND_POW:
|
case ZEND_POW:
|
||||||
|
@ -4574,6 +4574,7 @@ ZEND_API int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op,
|
||||||
if (t1 & MAY_BE_REF) {
|
if (t1 & MAY_BE_REF) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_BIND_STATIC:
|
case ZEND_BIND_STATIC:
|
||||||
case ZEND_UNSET_VAR:
|
case ZEND_UNSET_VAR:
|
||||||
return (t1 & (MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE|MAY_BE_ARRAY_OF_ARRAY));
|
return (t1 & (MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE|MAY_BE_ARRAY_OF_ARRAY));
|
||||||
|
@ -4670,6 +4671,9 @@ ZEND_API int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op,
|
||||||
return 0;
|
return 0;
|
||||||
EMPTY_SWITCH_DEFAULT_CASE()
|
EMPTY_SWITCH_DEFAULT_CASE()
|
||||||
}
|
}
|
||||||
|
/* GCC is getting confused here for the Wimplicit-fallthrough warning with
|
||||||
|
* EMPTY_SWITCH_DEFAULT_CASE() macro */
|
||||||
|
return 0;
|
||||||
case ZEND_ARRAY_KEY_EXISTS:
|
case ZEND_ARRAY_KEY_EXISTS:
|
||||||
if ((t2 & MAY_BE_ANY) != MAY_BE_ARRAY) {
|
if ((t2 & MAY_BE_ANY) != MAY_BE_ARRAY) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -325,7 +325,7 @@ int zend_optimizer_update_op1_const(zend_op_array *op_array,
|
||||||
if (opline->opcode == ZEND_CONCAT && opline->op2_type == IS_CONST) {
|
if (opline->opcode == ZEND_CONCAT && opline->op2_type == IS_CONST) {
|
||||||
opline->opcode = ZEND_FAST_CONCAT;
|
opline->opcode = ZEND_FAST_CONCAT;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
opline->op1.constant = zend_optimizer_add_literal(op_array, val);
|
opline->op1.constant = zend_optimizer_add_literal(op_array, val);
|
||||||
break;
|
break;
|
||||||
|
@ -353,7 +353,7 @@ int zend_optimizer_update_op2_const(zend_op_array *op_array,
|
||||||
(opline + 1)->op2.var == opline->result.var) {
|
(opline + 1)->op2.var == opline->result.var) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_INSTANCEOF:
|
case ZEND_INSTANCEOF:
|
||||||
REQUIRES_STRING(val);
|
REQUIRES_STRING(val);
|
||||||
drop_leading_backslash(val);
|
drop_leading_backslash(val);
|
||||||
|
@ -507,7 +507,7 @@ int zend_optimizer_update_op2_const(zend_op_array *op_array,
|
||||||
if (opline->opcode == ZEND_CONCAT && opline->op1_type == IS_CONST) {
|
if (opline->opcode == ZEND_CONCAT && opline->op1_type == IS_CONST) {
|
||||||
opline->opcode = ZEND_FAST_CONCAT;
|
opline->opcode = ZEND_FAST_CONCAT;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
opline->op2.constant = zend_optimizer_add_literal(op_array, val);
|
opline->op2.constant = zend_optimizer_add_literal(op_array, val);
|
||||||
break;
|
break;
|
||||||
|
@ -674,7 +674,7 @@ void zend_optimizer_migrate_jump(zend_op_array *op_array, zend_op *new_opline, z
|
||||||
break;
|
break;
|
||||||
case ZEND_JMPZNZ:
|
case ZEND_JMPZNZ:
|
||||||
new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
|
new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMPZ:
|
case ZEND_JMPZ:
|
||||||
case ZEND_JMPNZ:
|
case ZEND_JMPNZ:
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
|
@ -720,7 +720,7 @@ void zend_optimizer_shift_jump(zend_op_array *op_array, zend_op *opline, uint32_
|
||||||
break;
|
break;
|
||||||
case ZEND_JMPZNZ:
|
case ZEND_JMPZNZ:
|
||||||
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) - shiftlist[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
|
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) - shiftlist[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMPZ:
|
case ZEND_JMPZ:
|
||||||
case ZEND_JMPNZ:
|
case ZEND_JMPNZ:
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
|
|
|
@ -713,7 +713,7 @@ add_op1_def:
|
||||||
break;
|
break;
|
||||||
case ZEND_ADD_ARRAY_ELEMENT:
|
case ZEND_ADD_ARRAY_ELEMENT:
|
||||||
ssa_ops[k].result_use = var[EX_VAR_TO_NUM(opline->result.var)];
|
ssa_ops[k].result_use = var[EX_VAR_TO_NUM(opline->result.var)];
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_INIT_ARRAY:
|
case ZEND_INIT_ARRAY:
|
||||||
if (((build_flags & ZEND_SSA_RC_INFERENCE)
|
if (((build_flags & ZEND_SSA_RC_INFERENCE)
|
||||||
|| (opline->extended_value & ZEND_ARRAY_ELEMENT_REF))
|
|| (opline->extended_value & ZEND_ARRAY_ELEMENT_REF))
|
||||||
|
|
|
@ -942,6 +942,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
|
||||||
case 'Z': /* replace with 'z' */
|
case 'Z': /* replace with 'z' */
|
||||||
case 'L': /* replace with 'l' */
|
case 'L': /* replace with 'l' */
|
||||||
ZEND_ASSERT(0 && "ZPP modifier no longer supported");
|
ZEND_ASSERT(0 && "ZPP modifier no longer supported");
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
|
|
@ -2049,7 +2049,7 @@ simple_list:
|
||||||
break;
|
break;
|
||||||
case ZEND_AST_PROP_ELEM:
|
case ZEND_AST_PROP_ELEM:
|
||||||
smart_str_appendc(str, '$');
|
smart_str_appendc(str, '$');
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_AST_CONST_ELEM:
|
case ZEND_AST_CONST_ELEM:
|
||||||
zend_ast_export_name(str, ast->child[0], 0, indent);
|
zend_ast_export_name(str, ast->child[0], 0, indent);
|
||||||
APPEND_DEFAULT_VALUE(1);
|
APPEND_DEFAULT_VALUE(1);
|
||||||
|
|
|
@ -525,7 +525,7 @@ ZEND_FUNCTION(define)
|
||||||
val = &val_free;
|
val = &val_free;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
zval_ptr_dtor(&val_free);
|
zval_ptr_dtor(&val_free);
|
||||||
zend_argument_type_error(2, "cannot be an object, %s given", zend_zval_type_name(val));
|
zend_argument_type_error(2, "cannot be an object, %s given", zend_zval_type_name(val));
|
||||||
|
|
|
@ -298,7 +298,7 @@ static zend_never_inline ZEND_COLD zval *_get_zval_cv_lookup(zval *ptr, uint32_t
|
||||||
break;
|
break;
|
||||||
case BP_VAR_RW:
|
case BP_VAR_RW:
|
||||||
zval_undefined_cv(var EXECUTE_DATA_CC);
|
zval_undefined_cv(var EXECUTE_DATA_CC);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case BP_VAR_W:
|
case BP_VAR_W:
|
||||||
ZVAL_NULL(ptr);
|
ZVAL_NULL(ptr);
|
||||||
break;
|
break;
|
||||||
|
@ -1418,6 +1418,7 @@ try_again:
|
||||||
}
|
}
|
||||||
case IS_UNDEF:
|
case IS_UNDEF:
|
||||||
ZVAL_UNDEFINED_OP2();
|
ZVAL_UNDEFINED_OP2();
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case IS_DOUBLE:
|
case IS_DOUBLE:
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
case IS_FALSE:
|
case IS_FALSE:
|
||||||
|
@ -2081,7 +2082,7 @@ static zend_never_inline zend_uchar slow_index_convert(HashTable *ht, const zval
|
||||||
if (EG(exception)) {
|
if (EG(exception)) {
|
||||||
return IS_NULL;
|
return IS_NULL;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
}
|
}
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
value->str = ZSTR_EMPTY_ALLOC();
|
value->str = ZSTR_EMPTY_ALLOC();
|
||||||
|
@ -2122,7 +2123,7 @@ num_undef:
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BP_VAR_R:
|
case BP_VAR_R:
|
||||||
zend_undefined_offset(hval);
|
zend_undefined_offset(hval);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case BP_VAR_UNSET:
|
case BP_VAR_UNSET:
|
||||||
case BP_VAR_IS:
|
case BP_VAR_IS:
|
||||||
retval = &EG(uninitialized_zval);
|
retval = &EG(uninitialized_zval);
|
||||||
|
@ -2151,7 +2152,7 @@ str_index:
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BP_VAR_R:
|
case BP_VAR_R:
|
||||||
zend_undefined_index(offset_key);
|
zend_undefined_index(offset_key);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case BP_VAR_UNSET:
|
case BP_VAR_UNSET:
|
||||||
case BP_VAR_IS:
|
case BP_VAR_IS:
|
||||||
retval = &EG(uninitialized_zval);
|
retval = &EG(uninitialized_zval);
|
||||||
|
@ -2389,6 +2390,7 @@ try_string_offset:
|
||||||
}
|
}
|
||||||
case IS_UNDEF:
|
case IS_UNDEF:
|
||||||
ZVAL_UNDEFINED_OP2();
|
ZVAL_UNDEFINED_OP2();
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case IS_DOUBLE:
|
case IS_DOUBLE:
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
case IS_FALSE:
|
case IS_FALSE:
|
||||||
|
|
|
@ -184,7 +184,7 @@ ZEND_API void zend_strip(void)
|
||||||
zend_write(" ", sizeof(" ") - 1);
|
zend_write(" ", sizeof(" ") - 1);
|
||||||
prev_space = 1;
|
prev_space = 1;
|
||||||
}
|
}
|
||||||
/* lack of break; is intentional */
|
ZEND_FALLTHROUGH;
|
||||||
case T_COMMENT:
|
case T_COMMENT:
|
||||||
case T_DOC_COMMENT:
|
case T_DOC_COMMENT:
|
||||||
ZVAL_UNDEF(&token);
|
ZVAL_UNDEF(&token);
|
||||||
|
|
|
@ -187,7 +187,7 @@ static void zend_ini_copy_typed_value(zval *retval, const int type, const char *
|
||||||
if (convert_to_number(retval, str, len) == SUCCESS) {
|
if (convert_to_number(retval, str, len) == SUCCESS) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* intentional fall-through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
zend_ini_copy_value(retval, str, len);
|
zend_ini_copy_value(retval, str, len);
|
||||||
}
|
}
|
||||||
|
@ -328,6 +328,7 @@ static void zend_ini_escape_string(zval *lval, char *str, int len, char quote_ty
|
||||||
*t++ = *s;
|
*t++ = *s;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case '\\':
|
case '\\':
|
||||||
case '$':
|
case '$':
|
||||||
*t++ = *s;
|
*t++ = *s;
|
||||||
|
@ -606,7 +607,7 @@ end_raw_value_chars:
|
||||||
if (YYCURSOR < YYLIMIT && *YYCURSOR != '"') {
|
if (YYCURSOR < YYLIMIT && *YYCURSOR != '"') {
|
||||||
YYCURSOR++;
|
YYCURSOR++;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -986,6 +986,7 @@ static zend_result zend_scan_escape_string(zval *zendlval, char *str, int len, c
|
||||||
*t++ = *s;
|
*t++ = *s;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case '\\':
|
case '\\':
|
||||||
case '$':
|
case '$':
|
||||||
*t++ = *s;
|
*t++ = *s;
|
||||||
|
@ -2373,7 +2374,7 @@ inline_char_handler:
|
||||||
YYCURSOR--;
|
YYCURSOR--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2556,7 +2557,7 @@ skip_escape_conversion:
|
||||||
if (YYCURSOR < YYLIMIT) {
|
if (YYCURSOR < YYLIMIT) {
|
||||||
YYCURSOR++;
|
YYCURSOR++;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2793,7 +2794,7 @@ skip_escape_conversion:
|
||||||
if (YYCURSOR < YYLIMIT) {
|
if (YYCURSOR < YYLIMIT) {
|
||||||
YYCURSOR++;
|
YYCURSOR++;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2840,7 +2841,7 @@ double_quotes_scan_done:
|
||||||
if (YYCURSOR < YYLIMIT) {
|
if (YYCURSOR < YYLIMIT) {
|
||||||
YYCURSOR++;
|
YYCURSOR++;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2876,7 +2877,7 @@ double_quotes_scan_done:
|
||||||
if (*YYCURSOR == '\n') {
|
if (*YYCURSOR == '\n') {
|
||||||
YYCURSOR++;
|
YYCURSOR++;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
case '\n':
|
case '\n':
|
||||||
indentation = spacing = 0;
|
indentation = spacing = 0;
|
||||||
|
|
||||||
|
@ -2946,7 +2947,7 @@ double_quotes_scan_done:
|
||||||
if (YYCURSOR < YYLIMIT && *YYCURSOR != '\n' && *YYCURSOR != '\r') {
|
if (YYCURSOR < YYLIMIT && *YYCURSOR != '\n' && *YYCURSOR != '\r') {
|
||||||
YYCURSOR++;
|
YYCURSOR++;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -3000,7 +3001,7 @@ heredoc_scan_done:
|
||||||
if (*YYCURSOR == '\n') {
|
if (*YYCURSOR == '\n') {
|
||||||
YYCURSOR++;
|
YYCURSOR++;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
case '\n':
|
case '\n':
|
||||||
indentation = spacing = 0;
|
indentation = spacing = 0;
|
||||||
|
|
||||||
|
@ -3051,7 +3052,7 @@ heredoc_scan_done:
|
||||||
|
|
||||||
goto nowdoc_scan_done;
|
goto nowdoc_scan_done;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1812,7 +1812,7 @@ ZEND_API HashTable *zend_std_get_properties_for(zend_object *obj, zend_prop_purp
|
||||||
}
|
}
|
||||||
return ht;
|
return ht;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_PROP_PURPOSE_ARRAY_CAST:
|
case ZEND_PROP_PURPOSE_ARRAY_CAST:
|
||||||
case ZEND_PROP_PURPOSE_SERIALIZE:
|
case ZEND_PROP_PURPOSE_SERIALIZE:
|
||||||
case ZEND_PROP_PURPOSE_VAR_EXPORT:
|
case ZEND_PROP_PURPOSE_VAR_EXPORT:
|
||||||
|
|
|
@ -793,7 +793,7 @@ static void emit_live_range(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* explicit fallthrough */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
start++;
|
start++;
|
||||||
kind = ZEND_LIVE_TMPVAR;
|
kind = ZEND_LIVE_TMPVAR;
|
||||||
|
@ -1083,14 +1083,14 @@ ZEND_API void pass_two(zend_op_array *op_array)
|
||||||
if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
|
if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
|
||||||
zend_check_finally_breakout(op_array, opline - op_array->opcodes, opline->op1.opline_num);
|
zend_check_finally_breakout(op_array, opline - op_array->opcodes, opline->op1.opline_num);
|
||||||
}
|
}
|
||||||
/* break omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMP:
|
case ZEND_JMP:
|
||||||
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op1);
|
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op1);
|
||||||
break;
|
break;
|
||||||
case ZEND_JMPZNZ:
|
case ZEND_JMPZNZ:
|
||||||
/* absolute index to relative offset */
|
/* absolute index to relative offset */
|
||||||
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value);
|
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value);
|
||||||
/* break omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMPZ:
|
case ZEND_JMPZ:
|
||||||
case ZEND_JMPNZ:
|
case ZEND_JMPNZ:
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
|
|
|
@ -104,11 +104,11 @@ ZEND_API int ZEND_FASTCALL zend_atoi(const char *str, size_t str_len) /* {{{ */
|
||||||
case 'g':
|
case 'g':
|
||||||
case 'G':
|
case 'G':
|
||||||
retval *= 1024;
|
retval *= 1024;
|
||||||
/* break intentionally missing */
|
ZEND_FALLTHROUGH;
|
||||||
case 'm':
|
case 'm':
|
||||||
case 'M':
|
case 'M':
|
||||||
retval *= 1024;
|
retval *= 1024;
|
||||||
/* break intentionally missing */
|
ZEND_FALLTHROUGH;
|
||||||
case 'k':
|
case 'k':
|
||||||
case 'K':
|
case 'K':
|
||||||
retval *= 1024;
|
retval *= 1024;
|
||||||
|
@ -132,11 +132,11 @@ ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, size_t str_len) /* {
|
||||||
case 'g':
|
case 'g':
|
||||||
case 'G':
|
case 'G':
|
||||||
retval *= 1024;
|
retval *= 1024;
|
||||||
/* break intentionally missing */
|
ZEND_FALLTHROUGH;
|
||||||
case 'm':
|
case 'm':
|
||||||
case 'M':
|
case 'M':
|
||||||
retval *= 1024;
|
retval *= 1024;
|
||||||
/* break intentionally missing */
|
ZEND_FALLTHROUGH;
|
||||||
case 'k':
|
case 'k':
|
||||||
case 'K':
|
case 'K':
|
||||||
retval *= 1024;
|
retval *= 1024;
|
||||||
|
@ -2461,7 +2461,7 @@ try_again:
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case IS_RESOURCE:
|
case IS_RESOURCE:
|
||||||
case IS_ARRAY:
|
case IS_ARRAY:
|
||||||
zend_type_error("Cannot increment %s", zend_zval_type_name(op1));
|
zend_type_error("Cannot increment %s", zend_zval_type_name(op1));
|
||||||
|
@ -2523,7 +2523,7 @@ try_again:
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case IS_RESOURCE:
|
case IS_RESOURCE:
|
||||||
case IS_ARRAY:
|
case IS_ARRAY:
|
||||||
zend_type_error("Cannot decrement %s", zend_zval_type_name(op1));
|
zend_type_error("Cannot decrement %s", zend_zval_type_name(op1));
|
||||||
|
|
|
@ -113,6 +113,13 @@
|
||||||
# define ZEND_UNREACHABLE() ZEND_ASSUME(0)
|
# define ZEND_UNREACHABLE() ZEND_ASSUME(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* pseudo fallthrough keyword; */
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 7
|
||||||
|
# define ZEND_FALLTHROUGH __attribute__((__fallthrough__))
|
||||||
|
#else
|
||||||
|
# define ZEND_FALLTHROUGH ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Only use this macro if you know for sure that all of the switches values
|
/* Only use this macro if you know for sure that all of the switches values
|
||||||
are covered by its case statements */
|
are covered by its case statements */
|
||||||
#define EMPTY_SWITCH_DEFAULT_CASE() default: ZEND_UNREACHABLE(); break;
|
#define EMPTY_SWITCH_DEFAULT_CASE() default: ZEND_UNREACHABLE(); break;
|
||||||
|
|
|
@ -1911,7 +1911,7 @@ gethex( CONST char **sp, U *rvp, int rounding, int sign)
|
||||||
switch(*++s) {
|
switch(*++s) {
|
||||||
case '-':
|
case '-':
|
||||||
esign = 1;
|
esign = 1;
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case '+':
|
case '+':
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
@ -2578,11 +2578,11 @@ zend_strtod
|
||||||
for(s = s00;;s++) switch(*s) {
|
for(s = s00;;s++) switch(*s) {
|
||||||
case '-':
|
case '-':
|
||||||
sign = 1;
|
sign = 1;
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case '+':
|
case '+':
|
||||||
if (*++s)
|
if (*++s)
|
||||||
goto break2;
|
goto break2;
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 0:
|
case 0:
|
||||||
goto ret0;
|
goto ret0;
|
||||||
case '\t':
|
case '\t':
|
||||||
|
@ -2698,6 +2698,7 @@ zend_strtod
|
||||||
switch(c = *++s) {
|
switch(c = *++s) {
|
||||||
case '-':
|
case '-':
|
||||||
esign = 1;
|
esign = 1;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case '+':
|
case '+':
|
||||||
c = *++s;
|
c = *++s;
|
||||||
}
|
}
|
||||||
|
@ -3952,7 +3953,7 @@ zend_dtoa
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
leftright = 0;
|
leftright = 0;
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 4:
|
case 4:
|
||||||
if (ndigits <= 0)
|
if (ndigits <= 0)
|
||||||
ndigits = 1;
|
ndigits = 1;
|
||||||
|
@ -3960,7 +3961,7 @@ zend_dtoa
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
leftright = 0;
|
leftright = 0;
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 5:
|
case 5:
|
||||||
i = ndigits + k + 1;
|
i = ndigits + k + 1;
|
||||||
ilim = i;
|
ilim = i;
|
||||||
|
|
|
@ -1673,7 +1673,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type) /* {{{ */
|
||||||
*ptr++ = '\'';
|
*ptr++ = '\'';
|
||||||
*ptr++ = '\\';
|
*ptr++ = '\\';
|
||||||
*ptr++ = '\'';
|
*ptr++ = '\'';
|
||||||
/* fall-through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
*ptr++ = *dir;
|
*ptr++ = *dir;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2277,6 +2277,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
|
||||||
error = curl_easy_setopt(ch->cp, option, 2);
|
error = curl_easy_setopt(ch->cp, option, 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case CURLOPT_AUTOREFERER:
|
case CURLOPT_AUTOREFERER:
|
||||||
case CURLOPT_BUFFERSIZE:
|
case CURLOPT_BUFFERSIZE:
|
||||||
case CURLOPT_CONNECTTIMEOUT:
|
case CURLOPT_CONNECTTIMEOUT:
|
||||||
|
@ -2667,7 +2668,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue, bool i
|
||||||
zend_value_error("%s(): The provided file handle must be writable", get_active_function_name());
|
zend_value_error("%s(): The provided file handle must be writable", get_active_function_name());
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
/* break omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
error = curl_easy_setopt(ch->cp, option, fp);
|
error = curl_easy_setopt(ch->cp, option, fp);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -713,8 +713,8 @@ static zend_string *date_format(const char *format, size_t format_len, timelib_t
|
||||||
length = slprintf(buffer, sizeof(buffer), "%s", "Z");
|
length = slprintf(buffer, sizeof(buffer), "%s", "Z");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break intentionally missing */
|
ZEND_FALLTHROUGH;
|
||||||
case 'P': rfc_colon = 1; /* break intentionally missing */
|
case 'P': rfc_colon = 1; ZEND_FALLTHROUGH;
|
||||||
case 'O': length = slprintf(buffer, sizeof(buffer), "%c%02d%s%02d",
|
case 'O': length = slprintf(buffer, sizeof(buffer), "%c%02d%s%02d",
|
||||||
localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
|
localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
|
||||||
localtime ? abs(offset->offset / 3600) : 0,
|
localtime ? abs(offset->offset / 3600) : 0,
|
||||||
|
@ -765,7 +765,7 @@ static zend_string *date_format(const char *format, size_t format_len, timelib_t
|
||||||
break;
|
break;
|
||||||
case 'U': length = slprintf(buffer, sizeof(buffer), "%lld", (timelib_sll) t->sse); break;
|
case 'U': length = slprintf(buffer, sizeof(buffer), "%lld", (timelib_sll) t->sse); break;
|
||||||
|
|
||||||
case '\\': if (i < format_len) i++; /* break intentionally missing */
|
case '\\': if (i < format_len) i++; ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
default: buffer[0] = format[i]; buffer[1] = '\0'; length = 1; break;
|
default: buffer[0] = format[i]; buffer[1] = '\0'; length = 1; break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -637,7 +637,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||||
lock_flag = (hptr->flags & DBA_LOCK_ALL);
|
lock_flag = (hptr->flags & DBA_LOCK_ALL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 'l':
|
case 'l':
|
||||||
lock_flag = DBA_LOCK_ALL;
|
lock_flag = DBA_LOCK_ALL;
|
||||||
if ((hptr->flags & DBA_LOCK_ALL) == 0) {
|
if ((hptr->flags & DBA_LOCK_ALL) == 0) {
|
||||||
|
|
|
@ -184,6 +184,7 @@ int dom_node_node_value_write(dom_object *obj, zval *newval)
|
||||||
php_libxml_node_free_list((xmlNodePtr) nodep->children);
|
php_libxml_node_free_list((xmlNodePtr) nodep->children);
|
||||||
nodep->children = NULL;
|
nodep->children = NULL;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case XML_TEXT_NODE:
|
case XML_TEXT_NODE:
|
||||||
case XML_COMMENT_NODE:
|
case XML_COMMENT_NODE:
|
||||||
case XML_CDATA_SECTION_NODE:
|
case XML_CDATA_SECTION_NODE:
|
||||||
|
@ -618,6 +619,7 @@ int dom_node_prefix_write(dom_object *obj, zval *newval)
|
||||||
switch (nodep->type) {
|
switch (nodep->type) {
|
||||||
case XML_ELEMENT_NODE:
|
case XML_ELEMENT_NODE:
|
||||||
nsnode = nodep;
|
nsnode = nodep;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case XML_ATTRIBUTE_NODE:
|
case XML_ATTRIBUTE_NODE:
|
||||||
if (nsnode == NULL) {
|
if (nsnode == NULL) {
|
||||||
nsnode = nodep->parent;
|
nsnode = nodep->parent;
|
||||||
|
|
|
@ -2216,11 +2216,14 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
|
||||||
* return;
|
* return;
|
||||||
*/
|
*/
|
||||||
info_data->tag = TAG_FMT_UNDEFINED;/* otherwise not freed from memory */
|
info_data->tag = TAG_FMT_UNDEFINED;/* otherwise not freed from memory */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case TAG_FMT_SBYTE:
|
case TAG_FMT_SBYTE:
|
||||||
case TAG_FMT_BYTE:
|
case TAG_FMT_BYTE:
|
||||||
/* in contrast to strings bytes do not need to allocate buffer for NULL if length==0 */
|
/* in contrast to strings bytes do not need to allocate buffer for NULL if length==0 */
|
||||||
if (!length)
|
if (!length) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case TAG_FMT_UNDEFINED:
|
case TAG_FMT_UNDEFINED:
|
||||||
if (length > value_len) {
|
if (length > value_len) {
|
||||||
exif_error_docref("exif_iif_add_value" EXIFERR_CC, image_info, E_WARNING, "length > value_len: %d > %zu", length, value_len);
|
exif_error_docref("exif_iif_add_value" EXIFERR_CC, image_info, E_WARNING, "length > value_len: %d > %zu", length, value_len);
|
||||||
|
@ -2520,6 +2523,7 @@ static void add_assoc_image_info(zval *value, int sub_array, image_info_type *im
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case TAG_FMT_USHORT:
|
case TAG_FMT_USHORT:
|
||||||
case TAG_FMT_ULONG:
|
case TAG_FMT_ULONG:
|
||||||
if (l==1) {
|
if (l==1) {
|
||||||
|
@ -2546,6 +2550,7 @@ static void add_assoc_image_info(zval *value, int sub_array, image_info_type *im
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case TAG_FMT_SSHORT:
|
case TAG_FMT_SSHORT:
|
||||||
case TAG_FMT_SLONG:
|
case TAG_FMT_SLONG:
|
||||||
if (l==1) {
|
if (l==1) {
|
||||||
|
|
|
@ -2617,7 +2617,7 @@ static int zend_ffi_pass_var_arg(zval *arg, ffi_type **pass_type, void **arg_val
|
||||||
|
|
||||||
return zend_ffi_pass_arg(arg, type, pass_type, arg_values, n, execute_data);
|
return zend_ffi_pass_arg(arg, type, pass_type, arg_values, n, execute_data);
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
zend_throw_error(zend_ffi_exception_ce, "Unsupported argument type");
|
zend_throw_error(zend_ffi_exception_ce, "Unsupported argument type");
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
|
|
|
@ -99,6 +99,7 @@ static int php_filter_parse_int(const char *str, size_t str_len, zend_long *ret)
|
||||||
switch (*str) {
|
switch (*str) {
|
||||||
case '-':
|
case '-':
|
||||||
sign = 1;
|
sign = 1;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case '+':
|
case '+':
|
||||||
str++;
|
str++;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -2465,6 +2465,7 @@ int gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id)
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case GD_DEFAULT:
|
case GD_DEFAULT:
|
||||||
id = GD_BILINEAR_FIXED;
|
id = GD_BILINEAR_FIXED;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
/* Optimized versions */
|
/* Optimized versions */
|
||||||
case GD_BILINEAR_FIXED:
|
case GD_BILINEAR_FIXED:
|
||||||
case GD_BICUBIC_FIXED:
|
case GD_BICUBIC_FIXED:
|
||||||
|
|
|
@ -309,7 +309,7 @@ gdImagePtr gdImageCreateFromPngCtx (gdIOCtx * infile)
|
||||||
|
|
||||||
case PNG_COLOR_TYPE_GRAY_ALPHA:
|
case PNG_COLOR_TYPE_GRAY_ALPHA:
|
||||||
png_set_gray_to_rgb(png_ptr);
|
png_set_gray_to_rgb(png_ptr);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case PNG_COLOR_TYPE_RGB:
|
case PNG_COLOR_TYPE_RGB:
|
||||||
case PNG_COLOR_TYPE_RGB_ALPHA:
|
case PNG_COLOR_TYPE_RGB_ALPHA:
|
||||||
/* gd 2.0: we now support truecolor. See the comment above
|
/* gd 2.0: we now support truecolor. See the comment above
|
||||||
|
|
|
@ -1514,6 +1514,8 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* TODO might want to rearrange logic so this is more obvious */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case 9: /* choice point, seeing what to do next.*/
|
case 9: /* choice point, seeing what to do next.*/
|
||||||
switch (*p1) {
|
switch (*p1) {
|
||||||
|
@ -1537,7 +1539,7 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* break is omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case '\r': case '\n': case ' ': case '\t': {
|
case '\r': case '\n': case ' ': case '\t': {
|
||||||
zend_string *decoded_text;
|
zend_string *decoded_text;
|
||||||
|
@ -1688,7 +1690,7 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
|
||||||
scan_stat = 1;
|
scan_stat = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break is omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_php_iconv_appendc(pretval, *p1, cd_pl);
|
_php_iconv_appendc(pretval, *p1, cd_pl);
|
||||||
|
|
|
@ -2377,6 +2377,7 @@ PHP_FUNCTION(imap_utf7_decode)
|
||||||
case ST_DECODE2:
|
case ST_DECODE2:
|
||||||
case ST_DECODE1:
|
case ST_DECODE1:
|
||||||
outlen++;
|
outlen++;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case ST_DECODE0:
|
case ST_DECODE0:
|
||||||
state++;
|
state++;
|
||||||
case ST_NORMAL:
|
case ST_NORMAL:
|
||||||
|
|
|
@ -635,6 +635,7 @@ again:
|
||||||
return php_json_encode_serializable_enum(buf, val, options, encoder);
|
return php_json_encode_serializable_enum(buf, val, options, encoder);
|
||||||
}
|
}
|
||||||
/* fallthrough -- Non-serializable object */
|
/* fallthrough -- Non-serializable object */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case IS_ARRAY: {
|
case IS_ARRAY: {
|
||||||
/* Avoid modifications (and potential freeing) of the array through a reference when a
|
/* Avoid modifications (and potential freeing) of the array through a reference when a
|
||||||
* jsonSerialize() method is invoked. */
|
* jsonSerialize() method is invoked. */
|
||||||
|
|
|
@ -1592,12 +1592,16 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
|
||||||
case 9:
|
case 9:
|
||||||
case 8:
|
case 8:
|
||||||
ldap_deref = deref;
|
ldap_deref = deref;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 7:
|
case 7:
|
||||||
ldap_timelimit = timelimit;
|
ldap_timelimit = timelimit;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 6:
|
case 6:
|
||||||
ldap_sizelimit = sizelimit;
|
ldap_sizelimit = sizelimit;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 5:
|
case 5:
|
||||||
ldap_attrsonly = attrsonly;
|
ldap_attrsonly = attrsonly;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 4:
|
case 4:
|
||||||
num_attribs = zend_hash_num_elements(Z_ARRVAL_P(attrs));
|
num_attribs = zend_hash_num_elements(Z_ARRVAL_P(attrs));
|
||||||
ldap_attrs = safe_emalloc((num_attribs+1), sizeof(char *), 0);
|
ldap_attrs = safe_emalloc((num_attribs+1), sizeof(char *), 0);
|
||||||
|
@ -1617,6 +1621,7 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
|
||||||
ldap_attrs[i] = Z_STRVAL_P(attr);
|
ldap_attrs[i] = Z_STRVAL_P(attr);
|
||||||
}
|
}
|
||||||
ldap_attrs[num_attribs] = NULL;
|
ldap_attrs[num_attribs] = NULL;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3465,6 +3470,7 @@ PHP_FUNCTION(ldap_parse_result)
|
||||||
switch (myargcount) {
|
switch (myargcount) {
|
||||||
case 7:
|
case 7:
|
||||||
_php_ldap_controls_to_array(ld->link, lserverctrls, serverctrls, 0);
|
_php_ldap_controls_to_array(ld->link, lserverctrls, serverctrls, 0);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 6:
|
case 6:
|
||||||
referrals = zend_try_array_init(referrals);
|
referrals = zend_try_array_init(referrals);
|
||||||
if (!referrals) {
|
if (!referrals) {
|
||||||
|
@ -3478,6 +3484,7 @@ PHP_FUNCTION(ldap_parse_result)
|
||||||
}
|
}
|
||||||
ldap_memvfree((void**)lreferrals);
|
ldap_memvfree((void**)lreferrals);
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 5:
|
case 5:
|
||||||
if (lerrmsg == NULL) {
|
if (lerrmsg == NULL) {
|
||||||
ZEND_TRY_ASSIGN_REF_EMPTY_STRING(errmsg);
|
ZEND_TRY_ASSIGN_REF_EMPTY_STRING(errmsg);
|
||||||
|
@ -3485,6 +3492,7 @@ PHP_FUNCTION(ldap_parse_result)
|
||||||
ZEND_TRY_ASSIGN_REF_STRING(errmsg, lerrmsg);
|
ZEND_TRY_ASSIGN_REF_STRING(errmsg, lerrmsg);
|
||||||
ldap_memfree(lerrmsg);
|
ldap_memfree(lerrmsg);
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 4:
|
case 4:
|
||||||
if (lmatcheddn == NULL) {
|
if (lmatcheddn == NULL) {
|
||||||
ZEND_TRY_ASSIGN_REF_EMPTY_STRING(matcheddn);
|
ZEND_TRY_ASSIGN_REF_EMPTY_STRING(matcheddn);
|
||||||
|
@ -3538,6 +3546,7 @@ PHP_FUNCTION(ldap_parse_exop)
|
||||||
ZEND_TRY_ASSIGN_REF_STRING(retoid, lretoid);
|
ZEND_TRY_ASSIGN_REF_STRING(retoid, lretoid);
|
||||||
ldap_memfree(lretoid);
|
ldap_memfree(lretoid);
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 3:
|
case 3:
|
||||||
/* use arg #3 as the data returned by the server */
|
/* use arg #3 as the data returned by the server */
|
||||||
if (lretdata == NULL) {
|
if (lretdata == NULL) {
|
||||||
|
|
|
@ -165,6 +165,7 @@ static void php_libxml_node_free(xmlNodePtr node)
|
||||||
node->ns = NULL;
|
node->ns = NULL;
|
||||||
}
|
}
|
||||||
node->type = XML_ELEMENT_NODE;
|
node->type = XML_ELEMENT_NODE;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
xmlFreeNode(node);
|
xmlFreeNode(node);
|
||||||
}
|
}
|
||||||
|
@ -191,6 +192,7 @@ PHP_LIBXML_API void php_libxml_node_free_list(xmlNodePtr node)
|
||||||
if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) {
|
if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) {
|
||||||
xmlRemoveID(node->doc, (xmlAttrPtr) node);
|
xmlRemoveID(node->doc, (xmlAttrPtr) node);
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case XML_ATTRIBUTE_DECL:
|
case XML_ATTRIBUTE_DECL:
|
||||||
case XML_DTD_NODE:
|
case XML_DTD_NODE:
|
||||||
case XML_DOCUMENT_TYPE_NODE:
|
case XML_DOCUMENT_TYPE_NODE:
|
||||||
|
|
|
@ -373,6 +373,7 @@ mbfl_filt_conv_wchar_sjis_mac(int c, mbfl_convert_filter *filter)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
s1 = s2 = 0;
|
s1 = s2 = 0;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
|
|
||||||
|
|
|
@ -3351,7 +3351,7 @@ static int _php_mbstr_parse_mail_headers(HashTable *ht, const char *str, size_t
|
||||||
state = 3;
|
state = 3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break is missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
if (crlf_state == -1) {
|
if (crlf_state == -1) {
|
||||||
|
|
|
@ -1245,7 +1245,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn)
|
||||||
Do nothing, the connection will be brutally closed
|
Do nothing, the connection will be brutally closed
|
||||||
and the server will catch it and free close from its side.
|
and the server will catch it and free close from its side.
|
||||||
*/
|
*/
|
||||||
/* Fall-through */
|
ZEND_FALLTHROUGH;
|
||||||
case CONN_ALLOCED:
|
case CONN_ALLOCED:
|
||||||
/*
|
/*
|
||||||
Allocated but not connected or there was failure when trying
|
Allocated but not connected or there was failure when trying
|
||||||
|
@ -1254,7 +1254,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn)
|
||||||
Fall-through
|
Fall-through
|
||||||
*/
|
*/
|
||||||
SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
|
SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
|
||||||
/* Fall-through */
|
ZEND_FALLTHROUGH;
|
||||||
case CONN_QUIT_SENT:
|
case CONN_QUIT_SENT:
|
||||||
/* The user has killed its own connection */
|
/* The user has killed its own connection */
|
||||||
vio->data->m.close_stream(vio, conn->stats, conn->error_info);
|
vio->data->m.close_stream(vio, conn->stats, conn->error_info);
|
||||||
|
|
|
@ -515,6 +515,7 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const
|
||||||
case 'O':
|
case 'O':
|
||||||
case 'A':
|
case 'A':
|
||||||
self->flags |= MYSQLND_DEBUG_FLUSH;
|
self->flags |= MYSQLND_DEBUG_FLUSH;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 'a':
|
case 'a':
|
||||||
case 'o':
|
case 'o':
|
||||||
if (mode[i] == 'a' || mode[i] == 'A') {
|
if (mode[i] == 'a' || mode[i] == 'A') {
|
||||||
|
|
|
@ -712,7 +712,7 @@ mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval
|
||||||
break;
|
break;
|
||||||
case MYSQL_TYPE_LONGLONG:
|
case MYSQL_TYPE_LONGLONG:
|
||||||
is_longlong = 4;
|
is_longlong = 4;
|
||||||
/* fall-through */
|
ZEND_FALLTHROUGH;
|
||||||
case MYSQL_TYPE_LONG:
|
case MYSQL_TYPE_LONG:
|
||||||
{
|
{
|
||||||
zval *tmp_data = (*copies_param && !Z_ISUNDEF((*copies_param)[i]))? &(*copies_param)[i]: the_var;
|
zval *tmp_data = (*copies_param && !Z_ISUNDEF((*copies_param)[i]))? &(*copies_param)[i]: the_var;
|
||||||
|
|
|
@ -662,6 +662,8 @@ int odbc_bindcols(odbc_result *result)
|
||||||
#else
|
#else
|
||||||
charextraalloc = 1;
|
charextraalloc = 1;
|
||||||
#endif
|
#endif
|
||||||
|
/* TODO: Check this is the intended behaviour */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), colfieldid,
|
rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), colfieldid,
|
||||||
NULL, 0, NULL, &displaysize);
|
NULL, 0, NULL, &displaysize);
|
||||||
|
@ -1419,6 +1421,7 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
|
||||||
if (result->binmode == 1) {
|
if (result->binmode == 1) {
|
||||||
sql_c_type = SQL_C_BINARY;
|
sql_c_type = SQL_C_BINARY;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case SQL_LONGVARCHAR:
|
case SQL_LONGVARCHAR:
|
||||||
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
|
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
|
||||||
case SQL_WLONGVARCHAR:
|
case SQL_WLONGVARCHAR:
|
||||||
|
@ -1573,6 +1576,8 @@ PHP_FUNCTION(odbc_fetch_into)
|
||||||
}
|
}
|
||||||
if (result->binmode == 1) sql_c_type = SQL_C_BINARY;
|
if (result->binmode == 1) sql_c_type = SQL_C_BINARY;
|
||||||
|
|
||||||
|
/* TODO: Check this is the intended behaviour */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case SQL_LONGVARCHAR:
|
case SQL_LONGVARCHAR:
|
||||||
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
|
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
|
||||||
case SQL_WLONGVARCHAR:
|
case SQL_WLONGVARCHAR:
|
||||||
|
@ -1797,6 +1802,9 @@ PHP_FUNCTION(odbc_result)
|
||||||
if (result->binmode <= 0) {
|
if (result->binmode <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* TODO: Check this is the intended behaviour */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case SQL_LONGVARCHAR:
|
case SQL_LONGVARCHAR:
|
||||||
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
|
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
|
||||||
case SQL_WLONGVARCHAR:
|
case SQL_WLONGVARCHAR:
|
||||||
|
@ -1969,6 +1977,9 @@ PHP_FUNCTION(odbc_result_all)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (result->binmode <= 1) sql_c_type = SQL_C_BINARY;
|
if (result->binmode <= 1) sql_c_type = SQL_C_BINARY;
|
||||||
|
|
||||||
|
/* TODO: Check this is the intended behaviour */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case SQL_LONGVARCHAR:
|
case SQL_LONGVARCHAR:
|
||||||
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
|
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
|
||||||
case SQL_WLONGVARCHAR:
|
case SQL_WLONGVARCHAR:
|
||||||
|
|
|
@ -678,6 +678,7 @@ static int zend_may_overflow(const zend_op *opline, const zend_ssa_op *ssa_op, c
|
||||||
ssa->var_info[res].range.underflow ||
|
ssa->var_info[res].range.underflow ||
|
||||||
ssa->var_info[res].range.overflow);
|
ssa->var_info[res].range.overflow);
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2827,7 +2828,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
|
||||||
goto done;
|
goto done;
|
||||||
case ZEND_DO_UCALL:
|
case ZEND_DO_UCALL:
|
||||||
is_terminated = 1;
|
is_terminated = 1;
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_DO_ICALL:
|
case ZEND_DO_ICALL:
|
||||||
case ZEND_DO_FCALL_BY_NAME:
|
case ZEND_DO_FCALL_BY_NAME:
|
||||||
case ZEND_DO_FCALL:
|
case ZEND_DO_FCALL:
|
||||||
|
@ -3016,7 +3017,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
|
||||||
}
|
}
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMPZNZ:
|
case ZEND_JMPZNZ:
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
case ZEND_JMPNZ_EX:
|
case ZEND_JMPNZ_EX:
|
||||||
|
@ -3421,7 +3422,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
|
||||||
}
|
}
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
case ZEND_JMPNZ_EX:
|
case ZEND_JMPNZ_EX:
|
||||||
case ZEND_JMP_SET:
|
case ZEND_JMP_SET:
|
||||||
|
|
|
@ -390,7 +390,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_r_helper(zend_array *ht, zval *dim,
|
||||||
goto str_index;
|
goto str_index;
|
||||||
case IS_UNDEF:
|
case IS_UNDEF:
|
||||||
zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var);
|
zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
offset_key = ZSTR_EMPTY_ALLOC();
|
offset_key = ZSTR_EMPTY_ALLOC();
|
||||||
goto str_index;
|
goto str_index;
|
||||||
|
@ -455,7 +455,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_is_helper(zend_array *ht, zval *dim
|
||||||
goto str_index;
|
goto str_index;
|
||||||
case IS_UNDEF:
|
case IS_UNDEF:
|
||||||
zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var);
|
zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
offset_key = ZSTR_EMPTY_ALLOC();
|
offset_key = ZSTR_EMPTY_ALLOC();
|
||||||
goto str_index;
|
goto str_index;
|
||||||
|
@ -518,7 +518,7 @@ static int ZEND_FASTCALL zend_jit_fetch_dim_isset_helper(zend_array *ht, zval *d
|
||||||
goto str_index;
|
goto str_index;
|
||||||
case IS_UNDEF:
|
case IS_UNDEF:
|
||||||
zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var);
|
zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
offset_key = ZSTR_EMPTY_ALLOC();
|
offset_key = ZSTR_EMPTY_ALLOC();
|
||||||
goto str_index;
|
goto str_index;
|
||||||
|
@ -585,7 +585,7 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_rw_helper(zend_array *ht, zval *di
|
||||||
if (!zend_jit_undefined_op_helper_write(ht, EG(current_execute_data)->opline->op2.var)) {
|
if (!zend_jit_undefined_op_helper_write(ht, EG(current_execute_data)->opline->op2.var)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
offset_key = ZSTR_EMPTY_ALLOC();
|
offset_key = ZSTR_EMPTY_ALLOC();
|
||||||
goto str_index;
|
goto str_index;
|
||||||
|
@ -658,7 +658,7 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim
|
||||||
if (!zend_jit_undefined_op_helper_write(ht, EG(current_execute_data)->opline->op2.var)) {
|
if (!zend_jit_undefined_op_helper_write(ht, EG(current_execute_data)->opline->op2.var)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
offset_key = ZSTR_EMPTY_ALLOC();
|
offset_key = ZSTR_EMPTY_ALLOC();
|
||||||
goto str_index;
|
goto str_index;
|
||||||
|
@ -717,6 +717,7 @@ try_again:
|
||||||
}
|
}
|
||||||
case IS_UNDEF:
|
case IS_UNDEF:
|
||||||
zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var);
|
zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case IS_DOUBLE:
|
case IS_DOUBLE:
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
case IS_FALSE:
|
case IS_FALSE:
|
||||||
|
|
|
@ -1517,7 +1517,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
|
||||||
if (opline->result_type != IS_UNUSED) {
|
if (opline->result_type != IS_UNUSED) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_ASSIGN_DIM:
|
case ZEND_ASSIGN_DIM:
|
||||||
if (opline->op1_type == IS_CV) {
|
if (opline->op1_type == IS_CV) {
|
||||||
ADD_OP1_DATA_TRACE_GUARD();
|
ADD_OP1_DATA_TRACE_GUARD();
|
||||||
|
@ -1541,7 +1541,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
|
||||||
if (opline->result_type != IS_UNUSED) {
|
if (opline->result_type != IS_UNUSED) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_ASSIGN_OBJ:
|
case ZEND_ASSIGN_OBJ:
|
||||||
case ZEND_PRE_INC_OBJ:
|
case ZEND_PRE_INC_OBJ:
|
||||||
case ZEND_PRE_DEC_OBJ:
|
case ZEND_PRE_DEC_OBJ:
|
||||||
|
@ -1578,7 +1578,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
|
||||||
case ZEND_CONCAT:
|
case ZEND_CONCAT:
|
||||||
case ZEND_FAST_CONCAT:
|
case ZEND_FAST_CONCAT:
|
||||||
ADD_OP2_TRACE_GUARD();
|
ADD_OP2_TRACE_GUARD();
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_ECHO:
|
case ZEND_ECHO:
|
||||||
case ZEND_STRLEN:
|
case ZEND_STRLEN:
|
||||||
case ZEND_COUNT:
|
case ZEND_COUNT:
|
||||||
|
@ -1645,7 +1645,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
|
||||||
/* smart branch */
|
/* smart branch */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMPZNZ:
|
case ZEND_JMPZNZ:
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
case ZEND_JMPNZ_EX:
|
case ZEND_JMPNZ_EX:
|
||||||
|
@ -1671,7 +1671,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
|
||||||
// TODO: support for empty() ???
|
// TODO: support for empty() ???
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_FETCH_DIM_R:
|
case ZEND_FETCH_DIM_R:
|
||||||
case ZEND_FETCH_DIM_IS:
|
case ZEND_FETCH_DIM_IS:
|
||||||
case ZEND_FETCH_LIST_R:
|
case ZEND_FETCH_LIST_R:
|
||||||
|
@ -1722,7 +1722,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
|
||||||
if (opline->op2.num > MAX_ARG_FLAG_NUM) {
|
if (opline->op2.num > MAX_ARG_FLAG_NUM) {
|
||||||
goto propagate_arg;
|
goto propagate_arg;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_SEND_VAL:
|
case ZEND_SEND_VAL:
|
||||||
case ZEND_SEND_VAR:
|
case ZEND_SEND_VAR:
|
||||||
case ZEND_SEND_VAR_NO_REF:
|
case ZEND_SEND_VAR_NO_REF:
|
||||||
|
@ -1815,7 +1815,7 @@ propagate_arg:
|
||||||
|| !TRACE_FRAME_IS_LAST_SEND_BY_VAL(frame->call)) {
|
|| !TRACE_FRAME_IS_LAST_SEND_BY_VAL(frame->call)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_FETCH_OBJ_R:
|
case ZEND_FETCH_OBJ_R:
|
||||||
case ZEND_FETCH_OBJ_IS:
|
case ZEND_FETCH_OBJ_IS:
|
||||||
case ZEND_FETCH_OBJ_W:
|
case ZEND_FETCH_OBJ_W:
|
||||||
|
@ -4626,7 +4626,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
|
||||||
if (opline->extended_value != op1_type) {
|
if (opline->extended_value != op1_type) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_QM_ASSIGN:
|
case ZEND_QM_ASSIGN:
|
||||||
op1_addr = OP1_REG_ADDR();
|
op1_addr = OP1_REG_ADDR();
|
||||||
if (ra
|
if (ra
|
||||||
|
@ -5022,7 +5022,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
|
||||||
/* smart branch */
|
/* smart branch */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_JMPZNZ:
|
case ZEND_JMPZNZ:
|
||||||
case ZEND_JMPZ_EX:
|
case ZEND_JMPZ_EX:
|
||||||
case ZEND_JMPNZ_EX:
|
case ZEND_JMPNZ_EX:
|
||||||
|
@ -5167,7 +5167,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
|
||||||
|| !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) {
|
|| !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_FETCH_DIM_R:
|
case ZEND_FETCH_DIM_R:
|
||||||
case ZEND_FETCH_DIM_IS:
|
case ZEND_FETCH_DIM_IS:
|
||||||
case ZEND_FETCH_LIST_R:
|
case ZEND_FETCH_LIST_R:
|
||||||
|
@ -5365,7 +5365,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
|
||||||
|| !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) {
|
|| !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case ZEND_FETCH_OBJ_R:
|
case ZEND_FETCH_OBJ_R:
|
||||||
case ZEND_FETCH_OBJ_IS:
|
case ZEND_FETCH_OBJ_IS:
|
||||||
case ZEND_FETCH_OBJ_W:
|
case ZEND_FETCH_OBJ_W:
|
||||||
|
|
|
@ -153,7 +153,7 @@ static void zend_accel_blacklist_update_regexp(zend_blacklist *blacklist)
|
||||||
case '}':
|
case '}':
|
||||||
case '\\':
|
case '\\':
|
||||||
*p++ = '\\';
|
*p++ = '\\';
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
*p++ = *c++;
|
*p++ = *c++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,8 +238,7 @@ static int php_openssl_handle_ssl_error(php_stream *stream, int nr_bytes, bool i
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
/* fall through */
|
|
||||||
default:
|
default:
|
||||||
/* some other error */
|
/* some other error */
|
||||||
ecode = ERR_get_error();
|
ecode = ERR_get_error();
|
||||||
|
@ -540,6 +539,7 @@ static int php_openssl_apply_peer_verification_policy(SSL *ssl, X509 *peer, php_
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* not allowed, so fall through */
|
/* not allowed, so fall through */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
php_error_docref(NULL, E_WARNING,
|
php_error_docref(NULL, E_WARNING,
|
||||||
"Could not verify peer: code:%d %s",
|
"Could not verify peer: code:%d %s",
|
||||||
|
|
|
@ -1124,7 +1124,7 @@ static bool pdo_stmt_verify_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode
|
||||||
zend_argument_value_error(mode_arg_num, "cannot be PDO::FETCH_LAZY in PDOStatement::fetchAll()");
|
zend_argument_value_error(mode_arg_num, "cannot be PDO::FETCH_LAZY in PDOStatement::fetchAll()");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) {
|
if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) {
|
||||||
zend_argument_value_error(mode_arg_num, "must use PDO::FETCH_SERIALIZE with PDO::FETCH_CLASS");
|
zend_argument_value_error(mode_arg_num, "must use PDO::FETCH_SERIALIZE with PDO::FETCH_CLASS");
|
||||||
|
@ -1138,7 +1138,7 @@ static bool pdo_stmt_verify_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode
|
||||||
zend_argument_value_error(mode_arg_num, "must be a bitmask of PDO::FETCH_* constants");
|
zend_argument_value_error(mode_arg_num, "must be a bitmask of PDO::FETCH_* constants");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* no break; */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case PDO_FETCH_CLASS:
|
case PDO_FETCH_CLASS:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -429,6 +429,8 @@ int preprocess(const zend_string* sql, char* sql_out, HashTable* named_params)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* TODO Check this is correct? */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case ttWhite:
|
case ttWhite:
|
||||||
case ttComment:
|
case ttComment:
|
||||||
|
@ -962,6 +964,8 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *v
|
||||||
ZVAL_STRING(val, tmp);
|
ZVAL_STRING(val, tmp);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
/* TODO Check this is correct? */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case PDO_ATTR_FETCH_TABLE_NAMES:
|
case PDO_ATTR_FETCH_TABLE_NAMES:
|
||||||
ZVAL_BOOL(val, H->fetch_table_names);
|
ZVAL_BOOL(val, H->fetch_table_names);
|
||||||
|
|
|
@ -135,6 +135,7 @@ static int firebird_stmt_execute(pdo_stmt_t *stmt) /* {{{ */
|
||||||
}
|
}
|
||||||
stmt->row_count = affected_rows;
|
stmt->row_count = affected_rows;
|
||||||
}
|
}
|
||||||
|
/* TODO Dead code or assert one of the previous cases are hit? */
|
||||||
default:
|
default:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -685,6 +686,7 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
|
||||||
var->sqllen = Z_STRLEN_P(parameter);
|
var->sqllen = Z_STRLEN_P(parameter);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case IS_NULL:
|
case IS_NULL:
|
||||||
/* complain if this field doesn't allow NULL values */
|
/* complain if this field doesn't allow NULL values */
|
||||||
if (~var->sqltype & 1) {
|
if (~var->sqltype & 1) {
|
||||||
|
|
|
@ -297,6 +297,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
|
||||||
pdo_pgsql_error_stmt_msg(stmt, 0, "HY093", "parameter was not defined");
|
pdo_pgsql_error_stmt_msg(stmt, 0, "HY093", "parameter was not defined");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case PDO_PARAM_EVT_EXEC_POST:
|
case PDO_PARAM_EVT_EXEC_POST:
|
||||||
case PDO_PARAM_EVT_FETCH_PRE:
|
case PDO_PARAM_EVT_FETCH_PRE:
|
||||||
case PDO_PARAM_EVT_FETCH_POST:
|
case PDO_PARAM_EVT_FETCH_POST:
|
||||||
|
|
|
@ -63,6 +63,7 @@ static int pdo_sqlite_stmt_execute(pdo_stmt_t *stmt)
|
||||||
|
|
||||||
case SQLITE_ERROR:
|
case SQLITE_ERROR:
|
||||||
sqlite3_reset(S->stmt);
|
sqlite3_reset(S->stmt);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case SQLITE_MISUSE:
|
case SQLITE_MISUSE:
|
||||||
case SQLITE_BUSY:
|
case SQLITE_BUSY:
|
||||||
default:
|
default:
|
||||||
|
@ -225,6 +226,7 @@ static int pdo_sqlite_stmt_fetch(pdo_stmt_t *stmt,
|
||||||
|
|
||||||
case SQLITE_ERROR:
|
case SQLITE_ERROR:
|
||||||
sqlite3_reset(S->stmt);
|
sqlite3_reset(S->stmt);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
pdo_sqlite_error_stmt(stmt);
|
pdo_sqlite_error_stmt(stmt);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -328,6 +330,8 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, zend_long colno, zval *ret
|
||||||
|
|
||||||
case SQLITE_BLOB:
|
case SQLITE_BLOB:
|
||||||
add_next_index_string(&flags, "blob");
|
add_next_index_string(&flags, "blob");
|
||||||
|
/* TODO Check this is correct */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case SQLITE_TEXT:
|
case SQLITE_TEXT:
|
||||||
add_assoc_string(return_value, "native_type", "string");
|
add_assoc_string(return_value, "native_type", "string");
|
||||||
add_assoc_long(return_value, "pdo_type", PDO_PARAM_STR);
|
add_assoc_long(return_value, "pdo_type", PDO_PARAM_STR);
|
||||||
|
|
|
@ -4152,6 +4152,7 @@ static int php_pgsql_fd_cast(php_stream *stream, int cast_as, void **ret) /* {{{
|
||||||
*(php_socket_t *)ret = fd_number;
|
*(php_socket_t *)ret = fd_number;
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1485,7 +1485,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */
|
||||||
goto phar_spl_fileinfo;
|
goto phar_spl_fileinfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* fall-through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid value (must return a string)", ZSTR_VAL(ce->name));
|
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid value (must return a string)", ZSTR_VAL(ce->name));
|
||||||
return ZEND_HASH_APPLY_STOP;
|
return ZEND_HASH_APPLY_STOP;
|
||||||
|
|
|
@ -1896,6 +1896,7 @@ int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signat
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
phar->sig_flags = PHAR_SIG_SHA1;
|
phar->sig_flags = PHAR_SIG_SHA1;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case PHAR_SIG_SHA1: {
|
case PHAR_SIG_SHA1: {
|
||||||
unsigned char digest[20];
|
unsigned char digest[20];
|
||||||
PHP_SHA1_CTX context;
|
PHP_SHA1_CTX context;
|
||||||
|
|
|
@ -551,12 +551,14 @@ TODO:
|
||||||
if (retval) {
|
if (retval) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
retval = cli_completion_generator_define(text, textlen, &cli_completion_state, ce ? &ce->constants_table : EG(zend_constants));
|
retval = cli_completion_generator_define(text, textlen, &cli_completion_state, ce ? &ce->constants_table : EG(zend_constants));
|
||||||
if (retval || ce) {
|
if (retval || ce) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 4:
|
case 4:
|
||||||
case 5:
|
case 5:
|
||||||
retval = cli_completion_generator_class(lc_text, textlen, &cli_completion_state);
|
retval = cli_completion_generator_class(lc_text, textlen, &cli_completion_state);
|
||||||
|
|
|
@ -1527,7 +1527,7 @@ PHPAPI int php_session_start(void) /* {{{ */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PS(session_status) = php_session_none;
|
PS(session_status) = php_session_none;
|
||||||
/* Fall through */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case php_session_none:
|
case php_session_none:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -496,7 +496,7 @@ long_dim:
|
||||||
value_str = Z_STR(zval_copy);
|
value_str = Z_STR(zval_copy);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break is missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
if (member == &tmp_zv) {
|
if (member == &tmp_zv) {
|
||||||
zval_ptr_dtor_str(&tmp_zv);
|
zval_ptr_dtor_str(&tmp_zv);
|
||||||
|
|
|
@ -1766,6 +1766,8 @@ static sdlTypePtr model_array_element(sdlContentModelPtr model)
|
||||||
return model_array_element(tmp);
|
return model_array_element(tmp);
|
||||||
} ZEND_HASH_FOREACH_END();
|
} ZEND_HASH_FOREACH_END();
|
||||||
}
|
}
|
||||||
|
/* TODO Check this is correct */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case XSD_CONTENT_GROUP: {
|
case XSD_CONTENT_GROUP: {
|
||||||
return model_array_element(model->u.group->model);
|
return model_array_element(model->u.group->model);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2207,6 +2207,7 @@ static void schema_content_model_fixup(sdlCtx *ctx, sdlContentModelPtr model)
|
||||||
model->max_occurs = 1;
|
model->max_occurs = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case XSD_CONTENT_SEQUENCE:
|
case XSD_CONTENT_SEQUENCE:
|
||||||
case XSD_CONTENT_ALL: {
|
case XSD_CONTENT_ALL: {
|
||||||
sdlContentModelPtr tmp;
|
sdlContentModelPtr tmp;
|
||||||
|
|
|
@ -369,12 +369,14 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object *
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BP_VAR_R:
|
case BP_VAR_R:
|
||||||
zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(key.key));
|
zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(key.key));
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case BP_VAR_UNSET:
|
case BP_VAR_UNSET:
|
||||||
case BP_VAR_IS:
|
case BP_VAR_IS:
|
||||||
retval = &EG(uninitialized_zval);
|
retval = &EG(uninitialized_zval);
|
||||||
break;
|
break;
|
||||||
case BP_VAR_RW:
|
case BP_VAR_RW:
|
||||||
zend_error(E_WARNING,"Undefined array key \"%s\"", ZSTR_VAL(key.key));
|
zend_error(E_WARNING,"Undefined array key \"%s\"", ZSTR_VAL(key.key));
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case BP_VAR_W: {
|
case BP_VAR_W: {
|
||||||
ZVAL_NULL(retval);
|
ZVAL_NULL(retval);
|
||||||
}
|
}
|
||||||
|
@ -385,12 +387,14 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object *
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BP_VAR_R:
|
case BP_VAR_R:
|
||||||
zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(key.key));
|
zend_error(E_WARNING, "Undefined array key \"%s\"", ZSTR_VAL(key.key));
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case BP_VAR_UNSET:
|
case BP_VAR_UNSET:
|
||||||
case BP_VAR_IS:
|
case BP_VAR_IS:
|
||||||
retval = &EG(uninitialized_zval);
|
retval = &EG(uninitialized_zval);
|
||||||
break;
|
break;
|
||||||
case BP_VAR_RW:
|
case BP_VAR_RW:
|
||||||
zend_error(E_WARNING,"Undefined array key \"%s\"", ZSTR_VAL(key.key));
|
zend_error(E_WARNING,"Undefined array key \"%s\"", ZSTR_VAL(key.key));
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case BP_VAR_W: {
|
case BP_VAR_W: {
|
||||||
zval value;
|
zval value;
|
||||||
ZVAL_NULL(&value);
|
ZVAL_NULL(&value);
|
||||||
|
@ -404,12 +408,14 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object *
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BP_VAR_R:
|
case BP_VAR_R:
|
||||||
zend_error(E_WARNING, "Undefined array key " ZEND_LONG_FMT, key.h);
|
zend_error(E_WARNING, "Undefined array key " ZEND_LONG_FMT, key.h);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case BP_VAR_UNSET:
|
case BP_VAR_UNSET:
|
||||||
case BP_VAR_IS:
|
case BP_VAR_IS:
|
||||||
retval = &EG(uninitialized_zval);
|
retval = &EG(uninitialized_zval);
|
||||||
break;
|
break;
|
||||||
case BP_VAR_RW:
|
case BP_VAR_RW:
|
||||||
zend_error(E_WARNING, "Undefined array key " ZEND_LONG_FMT, key.h);
|
zend_error(E_WARNING, "Undefined array key " ZEND_LONG_FMT, key.h);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case BP_VAR_W: {
|
case BP_VAR_W: {
|
||||||
zval value;
|
zval value;
|
||||||
ZVAL_NULL(&value);
|
ZVAL_NULL(&value);
|
||||||
|
|
|
@ -2335,21 +2335,21 @@ PHP_METHOD(SplFileObject, fgetcsv)
|
||||||
} else {
|
} else {
|
||||||
escape = (unsigned char) esc[0];
|
escape = (unsigned char) esc[0];
|
||||||
}
|
}
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 2:
|
case 2:
|
||||||
if (e_len != 1) {
|
if (e_len != 1) {
|
||||||
zend_argument_value_error(2, "must be a single character");
|
zend_argument_value_error(2, "must be a single character");
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
}
|
}
|
||||||
enclosure = enclo[0];
|
enclosure = enclo[0];
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
if (d_len != 1) {
|
if (d_len != 1) {
|
||||||
zend_argument_value_error(1, "must be a single character");
|
zend_argument_value_error(1, "must be a single character");
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
}
|
}
|
||||||
delimiter = delim[0];
|
delimiter = delim[0];
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2387,21 +2387,21 @@ PHP_METHOD(SplFileObject, fputcsv)
|
||||||
zend_argument_value_error(4, "must be empty or a single character");
|
zend_argument_value_error(4, "must be empty or a single character");
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
}
|
}
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 3:
|
case 3:
|
||||||
if (e_len != 1) {
|
if (e_len != 1) {
|
||||||
zend_argument_value_error(3, "must be a single character");
|
zend_argument_value_error(3, "must be a single character");
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
}
|
}
|
||||||
enclosure = enclo[0];
|
enclosure = enclo[0];
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 2:
|
case 2:
|
||||||
if (d_len != 1) {
|
if (d_len != 1) {
|
||||||
zend_argument_value_error(2, "must be a single character");
|
zend_argument_value_error(2, "must be a single character");
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
}
|
}
|
||||||
delimiter = delim[0];
|
delimiter = delim[0];
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
|
@ -2440,21 +2440,21 @@ PHP_METHOD(SplFileObject, setCsvControl)
|
||||||
zend_argument_value_error(3, "must be empty or a single character");
|
zend_argument_value_error(3, "must be empty or a single character");
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
}
|
}
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 2:
|
case 2:
|
||||||
if (e_len != 1) {
|
if (e_len != 1) {
|
||||||
zend_argument_value_error(2, "must be a single character");
|
zend_argument_value_error(2, "must be a single character");
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
}
|
}
|
||||||
enclosure = enclo[0];
|
enclosure = enclo[0];
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
if (d_len != 1) {
|
if (d_len != 1) {
|
||||||
zend_argument_value_error(1, "must be a single character");
|
zend_argument_value_error(1, "must be a single character");
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
}
|
}
|
||||||
delimiter = delim[0];
|
delimiter = delim[0];
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,13 +244,15 @@ next_step:
|
||||||
zend_clear_exception();
|
zend_clear_exception();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
case RS_START:
|
case RS_START:
|
||||||
if (iterator->funcs->valid(iterator) == FAILURE) {
|
if (iterator->funcs->valid(iterator) == FAILURE) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
object->iterators[object->level].state = RS_TEST;
|
object->iterators[object->level].state = RS_TEST;
|
||||||
/* break; */
|
/* break; */
|
||||||
|
/* TODO: Check this is correct */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case RS_TEST:
|
case RS_TEST:
|
||||||
if (object->callHasChildren) {
|
if (object->callHasChildren) {
|
||||||
zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->callHasChildren, "callHasChildren", &retval);
|
zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->callHasChildren, "callHasChildren", &retval);
|
||||||
|
|
|
@ -1810,7 +1810,7 @@ PHP_METHOD(SQLite3Stmt, execute)
|
||||||
}
|
}
|
||||||
case SQLITE_ERROR:
|
case SQLITE_ERROR:
|
||||||
sqlite3_reset(stmt_obj->stmt);
|
sqlite3_reset(stmt_obj->stmt);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
if (!EG(exception)) {
|
if (!EG(exception)) {
|
||||||
php_sqlite3_error(stmt_obj->db_obj, "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->stmt)));
|
php_sqlite3_error(stmt_obj->db_obj, "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->stmt)));
|
||||||
|
|
|
@ -721,7 +721,7 @@ PHP_FUNCTION(count)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* fallthrough */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
zend_argument_type_error(1, "must be of type Countable|array, %s given", zend_zval_type_name(array));
|
zend_argument_type_error(1, "must be of type Countable|array, %s given", zend_zval_type_name(array));
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
|
|
|
@ -497,17 +497,17 @@ static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_t
|
||||||
add_assoc_string(subarray, "type", "MX");
|
add_assoc_string(subarray, "type", "MX");
|
||||||
GETSHORT(n, cp);
|
GETSHORT(n, cp);
|
||||||
add_assoc_long(subarray, "pri", n);
|
add_assoc_long(subarray, "pri", n);
|
||||||
/* no break; */
|
ZEND_FALLTHROUGH;
|
||||||
case DNS_T_CNAME:
|
case DNS_T_CNAME:
|
||||||
if (type == DNS_T_CNAME) {
|
if (type == DNS_T_CNAME) {
|
||||||
add_assoc_string(subarray, "type", "CNAME");
|
add_assoc_string(subarray, "type", "CNAME");
|
||||||
}
|
}
|
||||||
/* no break; */
|
ZEND_FALLTHROUGH;
|
||||||
case DNS_T_NS:
|
case DNS_T_NS:
|
||||||
if (type == DNS_T_NS) {
|
if (type == DNS_T_NS) {
|
||||||
add_assoc_string(subarray, "type", "NS");
|
add_assoc_string(subarray, "type", "NS");
|
||||||
}
|
}
|
||||||
/* no break; */
|
ZEND_FALLTHROUGH;
|
||||||
case DNS_T_PTR:
|
case DNS_T_PTR:
|
||||||
if (type == DNS_T_PTR) {
|
if (type == DNS_T_PTR) {
|
||||||
add_assoc_string(subarray, "type", "PTR");
|
add_assoc_string(subarray, "type", "PTR");
|
||||||
|
|
|
@ -358,7 +358,7 @@ PHPAPI zend_string *php_escape_shell_cmd(const char *str)
|
||||||
#else
|
#else
|
||||||
ZSTR_VAL(cmd)[y++] = '\\';
|
ZSTR_VAL(cmd)[y++] = '\\';
|
||||||
#endif
|
#endif
|
||||||
/* fall-through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
ZSTR_VAL(cmd)[y++] = str[x];
|
ZSTR_VAL(cmd)[y++] = str[x];
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ PHPAPI zend_string *php_escape_shell_arg(const char *str)
|
||||||
ZSTR_VAL(cmd)[y++] = '\\';
|
ZSTR_VAL(cmd)[y++] = '\\';
|
||||||
ZSTR_VAL(cmd)[y++] = '\'';
|
ZSTR_VAL(cmd)[y++] = '\'';
|
||||||
#endif
|
#endif
|
||||||
/* fall-through */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
ZSTR_VAL(cmd)[y++] = str[x];
|
ZSTR_VAL(cmd)[y++] = str[x];
|
||||||
}
|
}
|
||||||
|
|
|
@ -651,7 +651,7 @@ PHP_FUNCTION(file_put_contents)
|
||||||
case IS_FALSE:
|
case IS_FALSE:
|
||||||
case IS_TRUE:
|
case IS_TRUE:
|
||||||
convert_to_string(data);
|
convert_to_string(data);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case IS_STRING:
|
case IS_STRING:
|
||||||
if (Z_STRLEN_P(data)) {
|
if (Z_STRLEN_P(data)) {
|
||||||
numbytes = php_stream_write(stream, Z_STRVAL_P(data), Z_STRLEN_P(data));
|
numbytes = php_stream_write(stream, Z_STRVAL_P(data), Z_STRLEN_P(data));
|
||||||
|
@ -699,6 +699,7 @@ PHP_FUNCTION(file_put_contents)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
numbytes = -1;
|
numbytes = -1;
|
||||||
break;
|
break;
|
||||||
|
@ -1774,7 +1775,7 @@ quit_loop:
|
||||||
if (last_chars[0] == '\r') {
|
if (last_chars[0] == '\r') {
|
||||||
return ptr - 2;
|
return ptr - 2;
|
||||||
}
|
}
|
||||||
/* break is omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case '\r':
|
case '\r':
|
||||||
return ptr - 1;
|
return ptr - 1;
|
||||||
}
|
}
|
||||||
|
@ -2080,7 +2081,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int
|
||||||
memcpy(tptr, hunk_begin, bptr - hunk_begin);
|
memcpy(tptr, hunk_begin, bptr - hunk_begin);
|
||||||
tptr += (bptr - hunk_begin);
|
tptr += (bptr - hunk_begin);
|
||||||
hunk_begin = bptr;
|
hunk_begin = bptr;
|
||||||
/* break is omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case 0: {
|
case 0: {
|
||||||
char *new_buf;
|
char *new_buf;
|
||||||
|
@ -2132,7 +2133,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int
|
||||||
case -2:
|
case -2:
|
||||||
case -1:
|
case -1:
|
||||||
php_mb_reset();
|
php_mb_reset();
|
||||||
/* break is omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
/* we need to determine if the enclosure is
|
/* we need to determine if the enclosure is
|
||||||
* 'real' or is it escaped */
|
* 'real' or is it escaped */
|
||||||
|
@ -2201,7 +2202,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int
|
||||||
case -1:
|
case -1:
|
||||||
inc_len = 1;
|
inc_len = 1;
|
||||||
php_mb_reset();
|
php_mb_reset();
|
||||||
/* break is omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
if (*bptr == delimiter) {
|
if (*bptr == delimiter) {
|
||||||
goto quit_loop_3;
|
goto quit_loop_3;
|
||||||
|
@ -2232,7 +2233,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, int
|
||||||
case -1:
|
case -1:
|
||||||
inc_len = 1;
|
inc_len = 1;
|
||||||
php_mb_reset();
|
php_mb_reset();
|
||||||
/* break is omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
if (*bptr == delimiter) {
|
if (*bptr == delimiter) {
|
||||||
goto quit_loop_4;
|
goto quit_loop_4;
|
||||||
|
|
|
@ -951,7 +951,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins
|
||||||
ps++, icnt--;
|
ps++, icnt--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} /* break is missing intentionally */
|
} ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case 2: {
|
case 2: {
|
||||||
if (icnt == 0) {
|
if (icnt == 0) {
|
||||||
|
@ -968,7 +968,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins
|
||||||
if (scan_stat != 3) {
|
if (scan_stat != 3) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} /* break is missing intentionally */
|
} ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case 3: {
|
case 3: {
|
||||||
if (ocnt < 1) {
|
if (ocnt < 1) {
|
||||||
|
@ -1763,6 +1763,8 @@ static size_t php_dechunk(char *buf, size_t len, php_chunked_filter_data *data)
|
||||||
if (p == end) {
|
if (p == end) {
|
||||||
return out_len;
|
return out_len;
|
||||||
}
|
}
|
||||||
|
/* TODO: Check if Intentional? */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case CHUNK_SIZE_CR:
|
case CHUNK_SIZE_CR:
|
||||||
if (*p == '\r') {
|
if (*p == '\r') {
|
||||||
p++;
|
p++;
|
||||||
|
@ -1771,6 +1773,8 @@ static size_t php_dechunk(char *buf, size_t len, php_chunked_filter_data *data)
|
||||||
return out_len;
|
return out_len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* TODO: Check if Intentional? */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case CHUNK_SIZE_LF:
|
case CHUNK_SIZE_LF:
|
||||||
if (*p == '\n') {
|
if (*p == '\n') {
|
||||||
p++;
|
p++;
|
||||||
|
@ -1786,6 +1790,8 @@ static size_t php_dechunk(char *buf, size_t len, php_chunked_filter_data *data)
|
||||||
data->state = CHUNK_ERROR;
|
data->state = CHUNK_ERROR;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
/* TODO: Check if Intentional? */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case CHUNK_BODY:
|
case CHUNK_BODY:
|
||||||
if ((size_t) (end - p) >= data->chunk_size) {
|
if ((size_t) (end - p) >= data->chunk_size) {
|
||||||
if (p != out) {
|
if (p != out) {
|
||||||
|
@ -1807,6 +1813,8 @@ static size_t php_dechunk(char *buf, size_t len, php_chunked_filter_data *data)
|
||||||
out_len += end - p;
|
out_len += end - p;
|
||||||
return out_len;
|
return out_len;
|
||||||
}
|
}
|
||||||
|
/* TODO: Check if Intentional? */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case CHUNK_BODY_CR:
|
case CHUNK_BODY_CR:
|
||||||
if (*p == '\r') {
|
if (*p == '\r') {
|
||||||
p++;
|
p++;
|
||||||
|
@ -1815,6 +1823,8 @@ static size_t php_dechunk(char *buf, size_t len, php_chunked_filter_data *data)
|
||||||
return out_len;
|
return out_len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* TODO: Check if Intentional? */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case CHUNK_BODY_LF:
|
case CHUNK_BODY_LF:
|
||||||
if (*p == '\n') {
|
if (*p == '\n') {
|
||||||
p++;
|
p++;
|
||||||
|
|
|
@ -704,7 +704,7 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n
|
||||||
zend_value_error("Missing format specifier at end of string");
|
zend_value_error("Missing format specifier at end of string");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
zend_value_error("Unknown format specifier \"%c\"", *format);
|
zend_value_error("Unknown format specifier \"%c\"", *format);
|
||||||
|
|
|
@ -313,6 +313,7 @@ PHP_FUNCTION(headers_sent)
|
||||||
switch(ZEND_NUM_ARGS()) {
|
switch(ZEND_NUM_ARGS()) {
|
||||||
case 2:
|
case 2:
|
||||||
ZEND_TRY_ASSIGN_REF_LONG(arg2, line);
|
ZEND_TRY_ASSIGN_REF_LONG(arg2, line);
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 1:
|
case 1:
|
||||||
if (file) {
|
if (file) {
|
||||||
ZEND_TRY_ASSIGN_REF_STRING(arg1, file);
|
ZEND_TRY_ASSIGN_REF_STRING(arg1, file);
|
||||||
|
|
|
@ -300,7 +300,7 @@ PHP_FUNCTION(round)
|
||||||
if (places >= 0) {
|
if (places >= 0) {
|
||||||
RETURN_DOUBLE((double) Z_LVAL_P(value));
|
RETURN_DOUBLE((double) Z_LVAL_P(value));
|
||||||
}
|
}
|
||||||
/* break omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case IS_DOUBLE:
|
case IS_DOUBLE:
|
||||||
return_val = (Z_TYPE_P(value) == IS_LONG) ? (double)Z_LVAL_P(value) : Z_DVAL_P(value);
|
return_val = (Z_TYPE_P(value) == IS_LONG) ? (double)Z_LVAL_P(value) : Z_DVAL_P(value);
|
||||||
|
@ -773,7 +773,7 @@ PHPAPI void _php_math_basetozval(zend_string *str, int base, zval *ret)
|
||||||
fnum = (double)num;
|
fnum = (double)num;
|
||||||
mode = 1;
|
mode = 1;
|
||||||
}
|
}
|
||||||
/* fall-through */
|
ZEND_FALLTHROUGH;
|
||||||
case 1: /* Float */
|
case 1: /* Float */
|
||||||
fnum = fnum * base + c;
|
fnum = fnum * base + c;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ PHPAPI zend_string* php_inet_ntop(const struct sockaddr *addr) {
|
||||||
#ifdef AF_INET6
|
#ifdef AF_INET6
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
addrlen = sizeof(struct sockaddr_in6);
|
addrlen = sizeof(struct sockaddr_in6);
|
||||||
/* fallthrough */
|
ZEND_FALLTHROUGH;
|
||||||
#endif
|
#endif
|
||||||
case AF_INET: {
|
case AF_INET: {
|
||||||
zend_string *ret = zend_string_alloc(NI_MAXHOST, 0);
|
zend_string *ret = zend_string_alloc(NI_MAXHOST, 0);
|
||||||
|
|
|
@ -2556,7 +2556,7 @@ PHP_FUNCTION(quotemeta)
|
||||||
case '(':
|
case '(':
|
||||||
case ')':
|
case ')':
|
||||||
*q++ = '\\';
|
*q++ = '\\';
|
||||||
/* break is missing _intentionally_ */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
*q++ = c;
|
*q++ = c;
|
||||||
}
|
}
|
||||||
|
@ -3545,7 +3545,7 @@ PHPAPI void php_stripcslashes(zend_string *str)
|
||||||
*target++=(char)strtol(numtmp, NULL, 16);
|
*target++=(char)strtol(numtmp, NULL, 16);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break is left intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
i=0;
|
i=0;
|
||||||
while (source < end && *source >= '0' && *source <= '7' && i<3) {
|
while (source < end && *source >= '0' && *source <= '7' && i<3) {
|
||||||
|
@ -3812,7 +3812,7 @@ do_escape:
|
||||||
case '\"':
|
case '\"':
|
||||||
case '\\':
|
case '\\':
|
||||||
*target++ = '\\';
|
*target++ = '\\';
|
||||||
/* break is missing *intentionally* */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
*target++ = *source;
|
*target++ = *source;
|
||||||
break;
|
break;
|
||||||
|
@ -3953,7 +3953,7 @@ do_escape:
|
||||||
case '\"':
|
case '\"':
|
||||||
case '\\':
|
case '\\':
|
||||||
*target++ = '\\';
|
*target++ = '\\';
|
||||||
/* break is missing *intentionally* */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
*target++ = *source;
|
*target++ = *source;
|
||||||
break;
|
break;
|
||||||
|
@ -4574,7 +4574,7 @@ PHP_FUNCTION(nl2br)
|
||||||
if ((*tmp == '\r' && *(tmp+1) == '\n') || (*tmp == '\n' && *(tmp+1) == '\r')) {
|
if ((*tmp == '\r' && *(tmp+1) == '\n') || (*tmp == '\n' && *(tmp+1) == '\r')) {
|
||||||
*target++ = *tmp++;
|
*target++ = *tmp++;
|
||||||
}
|
}
|
||||||
/* lack of a break; is intentional */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
*target++ = *tmp;
|
*target++ = *tmp;
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,6 +231,7 @@ static int php_zlib_output_handler_ex(php_zlib_context *ctx, php_output_context
|
||||||
deflateEnd(&ctx->Z);
|
deflateEnd(&ctx->Z);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case Z_STREAM_END:
|
case Z_STREAM_END:
|
||||||
if (ctx->Z.avail_in) {
|
if (ctx->Z.avail_in) {
|
||||||
memmove(ctx->buffer.data, ctx->buffer.data + ctx->buffer.used - ctx->Z.avail_in, ctx->Z.avail_in);
|
memmove(ctx->buffer.data, ctx->buffer.data + ctx->buffer.used - ctx->Z.avail_in, ctx->Z.avail_in);
|
||||||
|
@ -366,7 +367,7 @@ static void php_zlib_output_compression_start(void)
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
ZLIBG(output_compression) = PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
|
ZLIBG(output_compression) = PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
|
||||||
/* break omitted intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
if ( php_zlib_output_encoding() &&
|
if ( php_zlib_output_encoding() &&
|
||||||
(h = php_zlib_output_handler_init(ZEND_STRL(PHP_ZLIB_OUTPUT_HANDLER_NAME), ZLIBG(output_compression), PHP_OUTPUT_HANDLER_STDFLAGS)) &&
|
(h = php_zlib_output_handler_init(ZEND_STRL(PHP_ZLIB_OUTPUT_HANDLER_NAME), ZLIBG(output_compression), PHP_OUTPUT_HANDLER_STDFLAGS)) &&
|
||||||
|
|
|
@ -1318,7 +1318,7 @@ static ZEND_COLD void php_error_cb(int orig_type, const char *error_filename, co
|
||||||
/* bad error in module startup - no way we can live with this */
|
/* bad error in module startup - no way we can live with this */
|
||||||
exit(-2);
|
exit(-2);
|
||||||
}
|
}
|
||||||
/* no break - intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case E_ERROR:
|
case E_ERROR:
|
||||||
case E_RECOVERABLE_ERROR:
|
case E_RECOVERABLE_ERROR:
|
||||||
case E_PARSE:
|
case E_PARSE:
|
||||||
|
|
|
@ -494,6 +494,7 @@ PHPAPI php_output_handler *php_output_handler_create_user(zval *output_handler,
|
||||||
handler = alias(Z_STRVAL_P(output_handler), Z_STRLEN_P(output_handler), chunk_size, flags);
|
handler = alias(Z_STRVAL_P(output_handler), Z_STRLEN_P(output_handler), chunk_size, flags);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
user = ecalloc(1, sizeof(php_output_handler_user_func_t));
|
user = ecalloc(1, sizeof(php_output_handler_user_func_t));
|
||||||
if (SUCCESS == zend_fcall_info_init(output_handler, 0, &user->fci, &user->fcc, &handler_name, &error)) {
|
if (SUCCESS == zend_fcall_info_init(output_handler, 0, &user->fci, &user->fcc, &handler_name, &error)) {
|
||||||
|
@ -1023,7 +1024,7 @@ static inline php_output_handler_status_t php_output_handler_op(php_output_handl
|
||||||
case PHP_OUTPUT_HANDLER_NO_DATA:
|
case PHP_OUTPUT_HANDLER_NO_DATA:
|
||||||
/* handler ate all */
|
/* handler ate all */
|
||||||
php_output_context_reset(context);
|
php_output_context_reset(context);
|
||||||
/* no break */
|
ZEND_FALLTHROUGH;
|
||||||
case PHP_OUTPUT_HANDLER_SUCCESS:
|
case PHP_OUTPUT_HANDLER_SUCCESS:
|
||||||
/* no more buffered data */
|
/* no more buffered data */
|
||||||
handler->buffer.used = 0;
|
handler->buffer.used = 0;
|
||||||
|
|
|
@ -749,6 +749,7 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) /
|
||||||
fmt++;
|
fmt++;
|
||||||
}
|
}
|
||||||
/* these are promoted to int, so no break */
|
/* these are promoted to int, so no break */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
modifier = LM_STD;
|
modifier = LM_STD;
|
||||||
break;
|
break;
|
||||||
|
@ -815,6 +816,7 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) /
|
||||||
* The rest also applies to other integer formats, so fall
|
* The rest also applies to other integer formats, so fall
|
||||||
* into that case.
|
* into that case.
|
||||||
*/
|
*/
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
/*
|
/*
|
||||||
|
@ -1143,6 +1145,7 @@ fmt_error:
|
||||||
* Note that we can't point s inside fmt because the
|
* Note that we can't point s inside fmt because the
|
||||||
* unknown <char> could be preceded by width etc.
|
* unknown <char> could be preceded by width etc.
|
||||||
*/
|
*/
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
char_buf[0] = '%';
|
char_buf[0] = '%';
|
||||||
char_buf[1] = *fmt;
|
char_buf[1] = *fmt;
|
||||||
|
|
|
@ -356,6 +356,7 @@ static void xbuf_format_converter(void *xbuf, bool is_char, const char *fmt, va_
|
||||||
fmt++;
|
fmt++;
|
||||||
}
|
}
|
||||||
/* these are promoted to int, so no break */
|
/* these are promoted to int, so no break */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
modifier = LM_STD;
|
modifier = LM_STD;
|
||||||
break;
|
break;
|
||||||
|
@ -422,6 +423,7 @@ static void xbuf_format_converter(void *xbuf, bool is_char, const char *fmt, va_
|
||||||
* The rest also applies to other integer formats, so fall
|
* The rest also applies to other integer formats, so fall
|
||||||
* into that case.
|
* into that case.
|
||||||
*/
|
*/
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
/*
|
/*
|
||||||
|
@ -749,6 +751,7 @@ fmt_error:
|
||||||
* Note that we can't point s inside fmt because the
|
* Note that we can't point s inside fmt because the
|
||||||
* unknown <char> could be preceded by width etc.
|
* unknown <char> could be preceded by width etc.
|
||||||
*/
|
*/
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
char_buf[0] = '%';
|
char_buf[0] = '%';
|
||||||
char_buf[1] = *fmt;
|
char_buf[1] = *fmt;
|
||||||
|
|
|
@ -1075,7 +1075,7 @@ PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, zen
|
||||||
//TODO: avoid reallocation???
|
//TODO: avoid reallocation???
|
||||||
*opened_path = zend_string_init(realpath, strlen(realpath), 0);
|
*opened_path = zend_string_init(realpath, strlen(realpath), 0);
|
||||||
}
|
}
|
||||||
/* fall through */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case PHP_STREAM_PERSISTENT_FAILURE:
|
case PHP_STREAM_PERSISTENT_FAILURE:
|
||||||
efree(persistent_id);
|
efree(persistent_id);
|
||||||
|
|
|
@ -1627,7 +1627,7 @@ static int php_cli_server_client_read_request_on_header_field(php_http_parser *p
|
||||||
switch (client->last_header_element) {
|
switch (client->last_header_element) {
|
||||||
case HEADER_VALUE:
|
case HEADER_VALUE:
|
||||||
php_cli_server_client_save_header(client);
|
php_cli_server_client_save_header(client);
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case HEADER_NONE:
|
case HEADER_NONE:
|
||||||
client->current_header_name = (char *)at;
|
client->current_header_name = (char *)at;
|
||||||
client->current_header_name_len = length;
|
client->current_header_name_len = length;
|
||||||
|
@ -1692,7 +1692,7 @@ static int php_cli_server_client_read_request_on_headers_complete(php_http_parse
|
||||||
client->current_header_value = pemalloc(1, 1);
|
client->current_header_value = pemalloc(1, 1);
|
||||||
*client->current_header_value = '\0';
|
*client->current_header_value = '\0';
|
||||||
client->current_header_value_len = 0;
|
client->current_header_value_len = 0;
|
||||||
/* break missing intentionally */
|
ZEND_FALLTHROUGH;
|
||||||
case HEADER_VALUE:
|
case HEADER_VALUE:
|
||||||
php_cli_server_client_save_header(client);
|
php_cli_server_client_save_header(client);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -308,6 +308,7 @@ static char *fpm_conf_set_time(zval *value, void **config, intptr_t offset) /* {
|
||||||
case 's' : /* s is the default suffix */
|
case 's' : /* s is the default suffix */
|
||||||
val[len-1] = '\0';
|
val[len-1] = '\0';
|
||||||
suffix = '0';
|
suffix = '0';
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default :
|
default :
|
||||||
if (suffix < '0' || suffix > '9') {
|
if (suffix < '0' || suffix > '9') {
|
||||||
return "unknown suffix used in time value";
|
return "unknown suffix used in time value";
|
||||||
|
|
|
@ -217,21 +217,24 @@ void fpm_pctl(int new_state, int action) /* {{{ */
|
||||||
case FPM_PCTL_STATE_RELOADING :
|
case FPM_PCTL_STATE_RELOADING :
|
||||||
/* 'reloading' can be overridden by 'finishing' */
|
/* 'reloading' can be overridden by 'finishing' */
|
||||||
if (new_state == FPM_PCTL_STATE_FINISHING) break;
|
if (new_state == FPM_PCTL_STATE_FINISHING) break;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case FPM_PCTL_STATE_FINISHING :
|
case FPM_PCTL_STATE_FINISHING :
|
||||||
/* 'reloading' and 'finishing' can be overridden by 'terminating' */
|
/* 'reloading' and 'finishing' can be overridden by 'terminating' */
|
||||||
if (new_state == FPM_PCTL_STATE_TERMINATING) break;
|
if (new_state == FPM_PCTL_STATE_TERMINATING) break;
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case FPM_PCTL_STATE_TERMINATING :
|
case FPM_PCTL_STATE_TERMINATING :
|
||||||
/* nothing can override 'terminating' state */
|
/* nothing can override 'terminating' state */
|
||||||
zlog(ZLOG_DEBUG, "not switching to '%s' state, because already in '%s' state",
|
zlog(ZLOG_DEBUG, "not switching to '%s' state, because already in '%s' state",
|
||||||
fpm_state_names[new_state], fpm_state_names[fpm_state]);
|
fpm_state_names[new_state], fpm_state_names[fpm_state]);
|
||||||
return;
|
return;
|
||||||
|
/* TODO Add EMPTY_SWITCH_DEFAULT_CASE? */
|
||||||
}
|
}
|
||||||
|
|
||||||
fpm_signal_sent = 0;
|
fpm_signal_sent = 0;
|
||||||
fpm_state = new_state;
|
fpm_state = new_state;
|
||||||
|
|
||||||
zlog(ZLOG_DEBUG, "switching to '%s' state", fpm_state_names[fpm_state]);
|
zlog(ZLOG_DEBUG, "switching to '%s' state", fpm_state_names[fpm_state]);
|
||||||
/* fall down */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case FPM_PCTL_ACTION_TIMEOUT :
|
case FPM_PCTL_ACTION_TIMEOUT :
|
||||||
fpm_pctl_action_next();
|
fpm_pctl_action_next();
|
||||||
|
|
|
@ -258,7 +258,7 @@ PHPDBG_API bool phpdbg_match_param(const phpdbg_param_t *l, const phpdbg_param_t
|
||||||
if (l->num != r->num) {
|
if (l->num != r->num) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break intentionally omitted */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case STR_PARAM:
|
case STR_PARAM:
|
||||||
return (l->len == r->len) &&
|
return (l->len == r->len) &&
|
||||||
|
@ -288,7 +288,7 @@ PHPDBG_API bool phpdbg_match_param(const phpdbg_param_t *l, const phpdbg_param_t
|
||||||
if (l->num != r->num) {
|
if (l->num != r->num) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* break intentionally omitted */
|
ZEND_FALLTHROUGH;
|
||||||
|
|
||||||
case METHOD_PARAM: {
|
case METHOD_PARAM: {
|
||||||
size_t lengths[2] = {
|
size_t lengths[2] = {
|
||||||
|
|
|
@ -305,6 +305,7 @@ static int format_converter(register buffy *odp, const char *fmt, bool escape_xm
|
||||||
fmt++;
|
fmt++;
|
||||||
}
|
}
|
||||||
/* these are promoted to int, so no break */
|
/* these are promoted to int, so no break */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
modifier = LM_STD;
|
modifier = LM_STD;
|
||||||
break;
|
break;
|
||||||
|
@ -367,6 +368,7 @@ static int format_converter(register buffy *odp, const char *fmt, bool escape_xm
|
||||||
* The rest also applies to other integer formats, so fall
|
* The rest also applies to other integer formats, so fall
|
||||||
* into that case.
|
* into that case.
|
||||||
*/
|
*/
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
/*
|
/*
|
||||||
|
@ -755,6 +757,7 @@ fmt_error:
|
||||||
* Note that we can't point s inside fmt because the
|
* Note that we can't point s inside fmt because the
|
||||||
* unknown <char> could be preceded by width etc.
|
* unknown <char> could be preceded by width etc.
|
||||||
*/
|
*/
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
char_buf[0] = '%';
|
char_buf[0] = '%';
|
||||||
char_buf[1] = *fmt;
|
char_buf[1] = *fmt;
|
||||||
|
|
|
@ -133,6 +133,8 @@ bool phpdbg_check_watch_diff(phpdbg_watchtype type, void *oldPtr, void *newPtr)
|
||||||
if (memcmp(&((Bucket *) oldPtr)->h, &((Bucket *) newPtr)->h, sizeof(Bucket) - sizeof(zval) /* key/val comparison */) != 0) {
|
if (memcmp(&((Bucket *) oldPtr)->h, &((Bucket *) newPtr)->h, sizeof(Bucket) - sizeof(zval) /* key/val comparison */) != 0) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
/* TODO: Is this intentional? */
|
||||||
|
ZEND_FALLTHROUGH;
|
||||||
case WATCH_ON_ZVAL:
|
case WATCH_ON_ZVAL:
|
||||||
return memcmp(oldPtr, newPtr, sizeof(zend_value) + sizeof(uint32_t) /* value + typeinfo */) != 0;
|
return memcmp(oldPtr, newPtr, sizeof(zend_value) + sizeof(uint32_t) /* value + typeinfo */) != 0;
|
||||||
case WATCH_ON_HASHTABLE:
|
case WATCH_ON_HASHTABLE:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue