Skip to content

Commit 62a1041

Browse files
committed
- Fixed compiler warning
1 parent 8350ca4 commit 62a1041

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

phpdbg_opcode.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
2828
static inline zend_uint phpdbg_decode_literal(zend_op_array *ops, zend_literal *literal TSRMLS_DC) /* {{{ */
2929
{
3030
zend_uint iter = 0;
31-
31+
3232
while (iter < ops->last_literal) {
3333
if (literal == &ops->literals[iter]) {
3434
return iter;
3535
}
3636
iter++;
3737
}
38-
38+
3939
return 0;
4040
} /* }}} */
4141

@@ -47,24 +47,24 @@ static inline char *phpdbg_decode_op(zend_op_array *ops, znode_op *op, zend_uint
4747
case IS_CV:
4848
asprintf(&decode, "$%s", ops->vars[op->var].name);
4949
break;
50-
50+
5151
case IS_VAR:
5252
case IS_TMP_VAR: {
5353
zend_ulong id = 0, *pid = NULL;
5454
if (zend_hash_index_find(vars, (zend_ulong) ops->vars - op->var, (void**) &pid) != SUCCESS) {
5555
id = zend_hash_num_elements(vars);
5656
zend_hash_index_update(
57-
vars, (zend_ulong) ops->vars - op->var,
58-
(void**) &id,
57+
vars, (zend_ulong) ops->vars - op->var,
58+
(void**) &id,
5959
sizeof(zend_ulong), NULL);
6060
} else id = *pid;
6161
asprintf(&decode, "@%lu", id);
6262
} break;
63-
63+
6464
case IS_CONST:
65-
asprintf(&decode, "C%lu", phpdbg_decode_literal(ops, op->literal TSRMLS_CC));
65+
asprintf(&decode, "C%u", phpdbg_decode_literal(ops, op->literal TSRMLS_CC));
6666
break;
67-
67+
6868
case IS_UNUSED:
6969
asprintf(&decode, "<unused>");
7070
break;
@@ -75,7 +75,7 @@ static inline char *phpdbg_decode_op(zend_op_array *ops, znode_op *op, zend_uint
7575
char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars TSRMLS_DC) /*{{{ */
7676
{
7777
char *decode[4] = {NULL, NULL, NULL, NULL};
78-
78+
7979
switch (op->opcode) {
8080
case ZEND_JMP:
8181
#ifdef ZEND_GOTO
@@ -86,18 +86,18 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars TSRM
8686
#endif
8787
asprintf(&decode[1], "#%lu", op->op1.jmp_addr - ops->opcodes);
8888
goto format;
89-
89+
9090
case ZEND_JMPZNZ:
9191
decode[1] = phpdbg_decode_op(ops, &op->op1, op->op1_type, vars TSRMLS_CC);
9292
asprintf(
93-
&decode[2], "#%lu or #%lu", op->op2.opline_num, op->extended_value);
93+
&decode[2], "#%u or #%lu", op->op2.opline_num, op->extended_value);
9494
goto result;
95-
95+
9696
case ZEND_JMPZ:
9797
case ZEND_JMPNZ:
9898
case ZEND_JMPZ_EX:
9999
case ZEND_JMPNZ_EX:
100-
100+
101101
#ifdef ZEND_JMP_SET
102102
case ZEND_JMP_SET:
103103
#endif
@@ -111,22 +111,22 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars TSRM
111111

112112
case ZEND_RECV_INIT:
113113
goto result;
114-
114+
115115
default: {
116116
decode[1] = phpdbg_decode_op(ops, &op->op1, op->op1_type, vars TSRMLS_CC);
117117
decode[2] = phpdbg_decode_op(ops, &op->op2, op->op2_type, vars TSRMLS_CC);
118118
result:
119-
decode[3] = phpdbg_decode_op(ops, &op->result, op->result_type, vars TSRMLS_CC);
119+
decode[3] = phpdbg_decode_op(ops, &op->result, op->result_type, vars TSRMLS_CC);
120120
format:
121121
asprintf(
122122
&decode[0],
123-
"%-20s %-20s %-20s",
124-
decode[1] ? decode[1] : "",
123+
"%-20s %-20s %-20s",
124+
decode[1] ? decode[1] : "",
125125
decode[2] ? decode[2] : "",
126126
decode[3] ? decode[3] : "");
127127
}
128128
}
129-
129+
130130
if (decode[1])
131131
free(decode[1]);
132132
if (decode[2])
@@ -147,7 +147,7 @@ void phpdbg_print_opline_ex(zend_execute_data *execute_data, HashTable *vars, ze
147147

148148
zend_op *opline = execute_data->opline;
149149
char *decode = phpdbg_decode_opline(execute_data->op_array, opline, vars TSRMLS_CC);
150-
150+
151151
if (ignore_flags ||
152152
(!(PHPDBG_G(flags) & PHPDBG_IS_QUIET) ||
153153
(PHPDBG_G(flags) & PHPDBG_IS_STEPPING))) {
@@ -168,7 +168,7 @@ void phpdbg_print_opline_ex(zend_execute_data *execute_data, HashTable *vars, ze
168168
decode,
169169
execute_data->op_array->filename ? execute_data->op_array->filename : "unknown");
170170
}
171-
171+
172172
if (decode) {
173173
free(decode);
174174
}
@@ -356,7 +356,7 @@ const char *phpdbg_decode_opcode(zend_uchar opcode) /* {{{ */
356356
CASE(ZEND_RECV_VARIADIC);
357357
#endif
358358
CASE(ZEND_OP_DATA);
359-
default:
359+
default:
360360
return "UNKNOWN";
361361
}
362362
} /* }}} */

0 commit comments

Comments
 (0)