Skip to content

Commit 3f3e340

Browse files
committed
Fixed compile warnings
1 parent 7810659 commit 3f3e340

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

sapi/phpdbg/phpdbg_cmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ PHPDBG_API char* phpdbg_param_tostring(const phpdbg_param_t *param, char **point
9999
break;
100100

101101
case ADDR_PARAM:
102-
asprintf(pointer, "%#llx", param->addr);
102+
asprintf(pointer, ZEND_ULONG_FMT, param->addr);
103103
break;
104104

105105
case NUMERIC_PARAM:
@@ -329,7 +329,7 @@ PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg)
329329
break;
330330

331331
case ADDR_PARAM:
332-
fprintf(stderr, "%s ADDR_PARAM(%llu)\n", msg, param->addr);
332+
fprintf(stderr, "%s ADDR_PARAM(" ZEND_ULONG_FMT ")\n", msg, param->addr);
333333
break;
334334

335335
case NUMERIC_FILE_PARAM:

sapi/phpdbg/phpdbg_opcode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static inline char *phpdbg_decode_op(zend_op_array *ops, znode_op *op, uint32_t
6060
zend_hash_index_update_mem(vars, (zend_ulong) ops->vars - op->var, &id, sizeof(zend_ulong));
6161
}
6262
}
63-
asprintf(&decode, "@%llu", id);
63+
asprintf(&decode, "@" ZEND_ULONG_FMT, id);
6464
} break;
6565

6666
case IS_CONST:
@@ -91,7 +91,7 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars) /*{
9191

9292
case ZEND_JMPZNZ:
9393
decode[1] = phpdbg_decode_op(ops, &op->op1, op->op1_type, vars);
94-
asprintf(&decode[2], "J%u or J%llu", op->op2.opline_num, op->extended_value);
94+
asprintf(&decode[2], "J%u or J%" PRIu32, op->op2.opline_num, op->extended_value);
9595
goto result;
9696

9797
case ZEND_JMPZ:

sapi/phpdbg/phpdbg_watch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static void phpdbg_delete_ht_watchpoints_recursive(phpdbg_watchpoint_t *watch) {
332332
if (strkey) {
333333
str_len = asprintf(&str, "%.*s%s%s%s", (int) watch->str_len, watch->str, (watch->flags & PHPDBG_WATCH_ARRAY) ? "[" : "->", phpdbg_get_property_key(strkey->val), (watch->flags & PHPDBG_WATCH_ARRAY) ? "]" : "");
334334
} else {
335-
str_len = asprintf(&str, "%.*s%s%lli%s", (int) watch->str_len, watch->str, (watch->flags & PHPDBG_WATCH_ARRAY) ? "[" : "->", numkey, (watch->flags & PHPDBG_WATCH_ARRAY) ? "]" : "");
335+
str_len = asprintf(&str, "%.*s%s" ZEND_LONG_FMT "%s", (int) watch->str_len, watch->str, (watch->flags & PHPDBG_WATCH_ARRAY) ? "[" : "->", numkey, (watch->flags & PHPDBG_WATCH_ARRAY) ? "]" : "");
336336
}
337337

338338
if ((watchpoint = zend_hash_str_find_ptr(&PHPDBG_G(watchpoints), str, str_len))) {

0 commit comments

Comments
 (0)