com php-src: Fixed compile warnings: sapi/phpdbg/phpdbg_cmd .c sapi/phpdbg/phpdbg_opcode.c sapi/phpdbg/phpdbg_w atch.c
| From: | Xinchen Hui | Date: | Mon, 09 Mar 2015 13:25:43 +0000 |
| Subject: | com php-src: Fixed compile warnings: sapi/phpdbg/phpdbg_cmd .c sapi/phpdbg/phpdbg_opcode.c sapi/phpdbg/phpdbg_w atch.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85414@lists.php.net to get a copy of this message | ||
Commit: 3f3e34040ae197da86cea580da8886675ace856a
Author: Wei Dai <demon@php.net> Mon, 9 Mar 2015 21:25:43 +0800
Parents: 7810659cc372b17d48a7f0a799cc1509471916a1
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3f3e34040ae197da86cea580da8886675ace856a
Log:
Fixed compile warnings
Changed paths:
M sapi/phpdbg/phpdbg_cmd.c
M sapi/phpdbg/phpdbg_opcode.c
M sapi/phpdbg/phpdbg_watch.c
Diff:
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c
index 3e3f932..6e5b2ec 100644
--- a/sapi/phpdbg/phpdbg_cmd.c
+++ b/sapi/phpdbg/phpdbg_cmd.c
@@ -99,7 +99,7 @@ PHPDBG_API char* phpdbg_param_tostring(const phpdbg_param_t *param, char **point
break;
case ADDR_PARAM:
- asprintf(pointer, "%#llx", param->addr);
+ asprintf(pointer, ZEND_ULONG_FMT, param->addr);
break;
case NUMERIC_PARAM:
@@ -329,7 +329,7 @@ PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg)
break;
case ADDR_PARAM:
- fprintf(stderr, "%s ADDR_PARAM(%llu)\n", msg, param->addr);
+ fprintf(stderr, "%s ADDR_PARAM(" ZEND_ULONG_FMT ")\n", msg,
param->addr);
break;
case NUMERIC_FILE_PARAM:
diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c
index a0b20bb..3cfc8e5 100644
--- a/sapi/phpdbg/phpdbg_opcode.c
+++ b/sapi/phpdbg/phpdbg_opcode.c
@@ -60,7 +60,7 @@ static inline char *phpdbg_decode_op(zend_op_array *ops, znode_op *op, uint32_t
zend_hash_index_update_mem(vars, (zend_ulong) ops->vars - op->var, &id,
sizeof(zend_ulong));
}
}
- asprintf(&decode, "@%llu", id);
+ asprintf(&decode, "@" ZEND_ULONG_FMT, id);
} break;
case IS_CONST:
@@ -91,7 +91,7 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars) /*{
case ZEND_JMPZNZ:
decode[1] = phpdbg_decode_op(ops, &op->op1, op->op1_type, vars);
- asprintf(&decode[2], "J%u or J%llu", op->op2.opline_num,
op->extended_value);
+ asprintf(&decode[2], "J%u or J%" PRIu32, op->op2.opline_num,
op->extended_value);
goto result;
case ZEND_JMPZ:
diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c
index c1d0762..f63b522 100644
--- a/sapi/phpdbg/phpdbg_watch.c
+++ b/sapi/phpdbg/phpdbg_watch.c
@@ -332,7 +332,7 @@ static void phpdbg_delete_ht_watchpoints_recursive(phpdbg_watchpoint_t *watch) {
if (strkey) {
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) ? "]"
: "");
} else {
- 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) ? "]" : "");
+ 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) ? "]" :
"");
}
if ((watchpoint = zend_hash_str_find_ptr(&PHPDBG_G(watchpoints), str, str_len))) {