Skip to content

Commit 0b0cec5

Browse files
committed
Fix clang warning
has_range_constraint should can be a bool, remove unused visited field. Closes GH-11729
1 parent 1a0ef2c commit 0b0cec5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Zend/Optimizer/zend_ssa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static void pi_range(
142142
constraint->range.underflow = underflow;
143143
constraint->range.overflow = overflow;
144144
constraint->negative = negative ? NEG_INIT : NEG_NONE;
145-
phi->has_range_constraint = 1;
145+
phi->has_range_constraint = true;
146146
}
147147
/* }}} */
148148

@@ -160,7 +160,7 @@ static inline void pi_range_max(zend_ssa_phi *phi, int var, zend_long val) {
160160
}
161161

162162
static void pi_type_mask(zend_ssa_phi *phi, uint32_t type_mask) {
163-
phi->has_range_constraint = 0;
163+
phi->has_range_constraint = false;
164164
phi->constraint.type.ce = NULL;
165165
phi->constraint.type.type_mask = MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN;
166166
phi->constraint.type.type_mask |= type_mask;

Zend/Optimizer/zend_ssa.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ struct _zend_ssa_phi {
6767
int var; /* Original CV, VAR or TMP variable index */
6868
int ssa_var; /* SSA variable index */
6969
int block; /* current BB index */
70-
int visited : 1; /* flag to avoid recursive processing */
71-
int has_range_constraint : 1;
70+
bool has_range_constraint : 1;
7271
zend_ssa_phi **use_chains;
7372
zend_ssa_phi *sym_use_chain;
7473
int *sources; /* Array of SSA IDs that produce this var.

0 commit comments

Comments
 (0)