summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_frame.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-04-12 11:20:29 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-04-12 11:46:03 +0200
commitc09b63595ef7edcaae6638932dceae531c26c3cf (patch)
treede1ca460f46c47475a6a9989e0822f100f19e9f8 /sapi/phpdbg/phpdbg_frame.c
parent88bfd2ae98fb163f4b8789b0cb41f7c01eff7c3f (diff)
downloadphp-git-c09b63595ef7edcaae6638932dceae531c26c3cf.tar.gz
Fix potentially uninitialized warnings in phpdbg
Diffstat (limited to 'sapi/phpdbg/phpdbg_frame.c')
-rw-r--r--sapi/phpdbg/phpdbg_frame.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c
index fb7acc20ce..912089ea23 100644
--- a/sapi/phpdbg/phpdbg_frame.c
+++ b/sapi/phpdbg/phpdbg_frame.c
@@ -171,7 +171,7 @@ void phpdbg_switch_frame(int frame) /* {{{ */
static void phpdbg_dump_prototype(zval *tmp) /* {{{ */
{
- zval *funcname, *class, class_zv, *type, *args, *argstmp;
+ zval *funcname, *class, class_zv, *args, *argstmp;
funcname = zend_hash_str_find(Z_ARRVAL_P(tmp), ZEND_STRL("function"));
@@ -183,21 +183,22 @@ static void phpdbg_dump_prototype(zval *tmp) /* {{{ */
}
if (class) {
- type = zend_hash_str_find(Z_ARRVAL_P(tmp), ZEND_STRL("type"));
+ zval *type = zend_hash_str_find(Z_ARRVAL_P(tmp), ZEND_STRL("type"));
+
+ phpdbg_xml(" symbol=\"%s%s%s\"", Z_STRVAL_P(class), Z_STRVAL_P(type), Z_STRVAL_P(funcname));
+ phpdbg_out("%s%s%s(", Z_STRVAL_P(class), Z_STRVAL_P(type), Z_STRVAL_P(funcname));
+ } else {
+ phpdbg_xml(" symbol=\"%s\"", Z_STRVAL_P(funcname));
+ phpdbg_out("%s(", Z_STRVAL_P(funcname));
}
args = zend_hash_str_find(Z_ARRVAL_P(tmp), ZEND_STRL("args"));
-
- phpdbg_xml(" symbol=\"%s%s%s\"", class ? Z_STRVAL_P(class) : "", class ? Z_STRVAL_P(type) : "", Z_STRVAL_P(funcname));
-
if (args) {
phpdbg_xml(">");
} else {
phpdbg_xml(" />");
}
- phpdbg_out("%s%s%s(", class ? Z_STRVAL_P(class) : "", class ? Z_STRVAL_P(type) : "", Z_STRVAL_P(funcname));
-
if (args) {
const zend_function *func = NULL;
const zend_arg_info *arginfo = NULL;