Fix clang warning

has_range_constraint should can be a bool, remove unused visited field.

Closes GH-11729
This commit is contained in:
Ilija Tovilo 2023-07-17 21:30:32 +02:00
parent 1a0ef2c1cc
commit 0b0cec5b8a
No known key found for this signature in database
GPG key ID: A4F5D403F118200A
2 changed files with 3 additions and 4 deletions

View file

@ -142,7 +142,7 @@ static void pi_range(
constraint->range.underflow = underflow; constraint->range.underflow = underflow;
constraint->range.overflow = overflow; constraint->range.overflow = overflow;
constraint->negative = negative ? NEG_INIT : NEG_NONE; constraint->negative = negative ? NEG_INIT : NEG_NONE;
phi->has_range_constraint = 1; phi->has_range_constraint = true;
} }
/* }}} */ /* }}} */
@ -160,7 +160,7 @@ static inline void pi_range_max(zend_ssa_phi *phi, int var, zend_long val) {
} }
static void pi_type_mask(zend_ssa_phi *phi, uint32_t type_mask) { static void pi_type_mask(zend_ssa_phi *phi, uint32_t type_mask) {
phi->has_range_constraint = 0; phi->has_range_constraint = false;
phi->constraint.type.ce = NULL; phi->constraint.type.ce = NULL;
phi->constraint.type.type_mask = MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN; phi->constraint.type.type_mask = MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN;
phi->constraint.type.type_mask |= type_mask; phi->constraint.type.type_mask |= type_mask;

View file

@ -67,8 +67,7 @@ struct _zend_ssa_phi {
int var; /* Original CV, VAR or TMP variable index */ int var; /* Original CV, VAR or TMP variable index */
int ssa_var; /* SSA variable index */ int ssa_var; /* SSA variable index */
int block; /* current BB index */ int block; /* current BB index */
int visited : 1; /* flag to avoid recursive processing */ bool has_range_constraint : 1;
int has_range_constraint : 1;
zend_ssa_phi **use_chains; zend_ssa_phi **use_chains;
zend_ssa_phi *sym_use_chain; zend_ssa_phi *sym_use_chain;
int *sources; /* Array of SSA IDs that produce this var. int *sources; /* Array of SSA IDs that produce this var.