Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed warnings when compiling with -Wall against PHP 5.4

  • Loading branch information...
commit 0e562c9628da0cde7d80cc7628afa68478d05df7 1 parent 6f2bb80
Patrick Allaert patrickallaert authored
7 usefulstuff.c
View
@@ -542,8 +542,9 @@ int xdebug_format_output_filename(char **filename, char *format, char *script_na
switch (*format)
{
case 'c': /* crc32 of the current working directory */
- VCWD_GETCWD(cwd, 127);
- xdebug_str_add(&fname, xdebug_sprintf("%lu", xdebug_crc32(cwd, strlen(cwd))), 1);
+ if (VCWD_GETCWD(cwd, 127)) {
+ xdebug_str_add(&fname, xdebug_sprintf("%lu", xdebug_crc32(cwd, strlen(cwd))), 1);
+ }
break;
case 'p': /* pid */
@@ -601,7 +602,7 @@ int xdebug_format_output_filename(char **filename, char *format, char *script_na
case 'R': { /* $_SERVER['REQUEST_URI'] */
zval **data;
char *char_ptr, *strval;
- int retval;
+ int retval = FAILURE;
if (PG(http_globals)[TRACK_VARS_SERVER]) {
switch (*format) {
19 xdebug.c
View
@@ -367,6 +367,8 @@ char *xdebug_env_key(TSRMLS_D)
if (ide_key && *ide_key) {
return ide_key;
}
+
+ return NULL;
}
void xdebug_env_config(TSRMLS_D)
@@ -1081,11 +1083,11 @@ static void add_used_variables(function_stack_entry *fse, zend_op_array *op_arra
int cv_len;
if (op_array->opcodes[i].XDEBUG_TYPE(op1) == IS_CV) {
- cv = zend_get_compiled_variable_name(op_array, op_array->opcodes[i].XDEBUG_ZNODE_ELEM(op1,var), &cv_len);
+ cv = (char *) zend_get_compiled_variable_name(op_array, op_array->opcodes[i].XDEBUG_ZNODE_ELEM(op1,var), &cv_len);
xdebug_llist_insert_next(fse->used_vars, XDEBUG_LLIST_TAIL(fse->used_vars), xdstrdup(cv));
}
if (op_array->opcodes[i].XDEBUG_TYPE(op2) == IS_CV) {
- cv = zend_get_compiled_variable_name(op_array, op_array->opcodes[i].XDEBUG_ZNODE_ELEM(op2,var), &cv_len);
+ cv = (char *) zend_get_compiled_variable_name(op_array, op_array->opcodes[i].XDEBUG_ZNODE_ELEM(op2,var), &cv_len);
xdebug_llist_insert_next(fse->used_vars, XDEBUG_LLIST_TAIL(fse->used_vars), xdstrdup(cv));
}
i++;
@@ -1157,9 +1159,9 @@ static void xdebug_throw_exception_hook(zval *exception TSRMLS_DC)
if (XG(remote_enabled)) {
/* Check if we have a breakpoint on this exception */
- if (xdebug_hash_find(XG(context).exception_breakpoints, exception_ce->name, strlen(exception_ce->name), (void *) &extra_brk_info)) {
+ if (xdebug_hash_find(XG(context).exception_breakpoints, (char *) exception_ce->name, strlen(exception_ce->name), (void *) &extra_brk_info)) {
if (xdebug_handle_hit_value(extra_brk_info)) {
- if (!XG(context).handler->remote_breakpoint(&(XG(context)), XG(stack), Z_STRVAL_P(file), Z_LVAL_P(line), XDEBUG_BREAK, exception_ce->name, Z_STRVAL_P(message))) {
+ if (!XG(context).handler->remote_breakpoint(&(XG(context)), XG(stack), Z_STRVAL_P(file), Z_LVAL_P(line), XDEBUG_BREAK, (char *) exception_ce->name, Z_STRVAL_P(message))) {
XG(remote_enabled) = 0;
}
}
@@ -1319,7 +1321,7 @@ void xdebug_execute(zend_op_array *op_array TSRMLS_DC)
!XG(profiler_enabled) &&
(XG(profiler_enable) || xdebug_trigger_enabled(XG(profiler_enable_trigger), "XDEBUG_PROFILE" TSRMLS_CC))
) {
- if (xdebug_profiler_init(op_array->filename TSRMLS_CC) == SUCCESS) {
+ if (xdebug_profiler_init((char *) op_array->filename TSRMLS_CC) == SUCCESS) {
XG(profiler_enabled) = 1;
}
}
@@ -1445,7 +1447,7 @@ void xdebug_execute_internal(zend_execute_data *current_execute_data, int return
int function_nr = 0;
int restore_error_handler_situation = 0;
- void (*tmp_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
+ void (*tmp_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) = NULL;
XG(level)++;
if (XG(level) == XG(max_nesting_level)) {
@@ -1554,6 +1556,9 @@ static int xdebug_header_handler(sapi_header_struct *h XG_SAPI_HEADER_OP_DC, sap
break;
case SAPI_HEADER_DELETE_ALL:
xdebug_llist_empty(XG(headers), NULL);
+ case SAPI_HEADER_DELETE:
+ case SAPI_HEADER_SET_STATUS:
+ break;
}
#else
xdebug_llist_insert_next(XG(headers), XDEBUG_LLIST_TAIL(XG(headers)), xdstrdup(h->header));
@@ -1857,7 +1862,7 @@ ZEND_DLEXPORT void xdebug_statement_call(zend_op_array *op_array)
lineno = EG(current_execute_data)->opline->lineno;
- file = op_array->filename;
+ file = (char *) op_array->filename;
if (XG(do_code_coverage)) {
xdebug_count_line(file, lineno, 0, 0 TSRMLS_CC);
8 xdebug_code_coverage.c
View
@@ -61,7 +61,7 @@ int xdebug_common_override_handler(ZEND_OPCODE_HANDLER_ARGS)
cur_opcode = *EG(opline_ptr);
lineno = cur_opcode->lineno;
- file = op_array->filename;
+ file = (char *)op_array->filename;
xdebug_count_line(file, lineno, 0, 0 TSRMLS_CC);
}
@@ -221,7 +221,7 @@ static int xdebug_common_assign_dim_handler(char *op, int do_cc, ZEND_OPCODE_HAN
cur_opcode = *EG(opline_ptr);
next_opcode = cur_opcode + 1;
- file = op_array->filename;
+ file = (char *) op_array->filename;
lineno = cur_opcode->lineno;
if (do_cc && XG(do_code_coverage)) {
@@ -550,7 +550,7 @@ static int prefill_from_function_table(zend_op_array *opa XDEBUG_ZEND_HASH_APPLY
new_filename = va_arg(args, char*);
if (opa->type == ZEND_USER_FUNCTION) {
if (opa->reserved[XG(reserved_offset)] != (void*) 1 /* && opa->filename && strcmp(opa->filename, new_filename) == 0)*/) {
- prefill_from_oparray(opa->filename, opa TSRMLS_CC);
+ prefill_from_oparray((char *) opa->filename, opa TSRMLS_CC);
}
}
@@ -578,7 +578,7 @@ static int prefill_from_class_table(zend_class_entry **class_entry XDEBUG_ZEND_H
void xdebug_prefill_code_coverage(zend_op_array *op_array TSRMLS_DC)
{
if (op_array->reserved[XG(reserved_offset)] != (void*) 1) {
- prefill_from_oparray(op_array->filename, op_array TSRMLS_CC);
+ prefill_from_oparray((char *) op_array->filename, op_array TSRMLS_CC);
}
zend_hash_apply_with_arguments(CG(function_table) XDEBUG_ZEND_HASH_APPLY_TSRMLS_CC, (apply_func_args_t) prefill_from_function_table, 1, op_array->filename);
4 xdebug_handler_dbgp.c
View
@@ -302,7 +302,7 @@ inline static char *fetch_classname_from_zval(zval *z, int *length, zend_class_e
tmp_ce = zend_get_class_entry(z TSRMLS_CC);
if (Z_OBJ_HT_P(z)->get_class_name == NULL ||
- Z_OBJ_HT_P(z)->get_class_name(z, &name, &name_len, 0 TSRMLS_CC) != SUCCESS) {
+ Z_OBJ_HT_P(z)->get_class_name(z, (const char **) &name, &name_len, 0 TSRMLS_CC) != SUCCESS) {
if (!tmp_ce) {
return NULL;
@@ -833,7 +833,7 @@ static xdebug_xml_node* return_stackframe(int nr TSRMLS_DC)
}
xdebug_xml_add_attribute_ex(tmp, "lineno", xdebug_sprintf("%lu", fse_prev->lineno TSRMLS_CC), 0, 1);
} else {
- tmp_filename = zend_get_executed_filename(TSRMLS_C);
+ tmp_filename = (char *) zend_get_executed_filename(TSRMLS_C);
tmp_lineno = zend_get_executed_lineno(TSRMLS_C);
if (check_evaled_code(fse, &tmp_filename, &tmp_lineno, 0 TSRMLS_CC)) {
xdebug_xml_add_attribute_ex(tmp, "type", xdstrdup("eval"), 0, 1);
8 xdebug_stack.c
View
@@ -273,7 +273,7 @@ void xdebug_append_error_description(xdebug_str *str, int html, const char *erro
#endif
if (html) {
- escaped = php_escape_html_entities(buffer, strlen(buffer), &newlen, 0, 0, NULL TSRMLS_CC);
+ escaped = php_escape_html_entities((unsigned char *) buffer, strlen(buffer), &newlen, 0, 0, NULL TSRMLS_CC);
} else {
escaped = estrdup(buffer);
}
@@ -661,7 +661,7 @@ void xdebug_error_cb(int type, const char *error_filename, const uint error_line
if (XG(remote_enabled) && XG(breakpoints_allowed)) {
if (xdebug_hash_find(XG(context).exception_breakpoints, error_type_str, strlen(error_type_str), (void *) &extra_brk_info)) {
if (xdebug_handle_hit_value(extra_brk_info)) {
- if (!XG(context).handler->remote_breakpoint(&(XG(context)), XG(stack), error_filename, error_lineno, XDEBUG_BREAK, error_type_str, buffer)) {
+ if (!XG(context).handler->remote_breakpoint(&(XG(context)), XG(stack), (char *) error_filename, error_lineno, XDEBUG_BREAK, error_type_str, buffer)) {
XG(remote_enabled) = 0;
}
}
@@ -927,8 +927,8 @@ function_stack_entry *xdebug_add_stack_frame(zend_execute_data *zdata, zend_op_a
zend_op *cur_opcode;
zval **param;
int i = 0;
- char *aggr_key;
- int aggr_key_len;
+ char *aggr_key = NULL;
+ int aggr_key_len = 0;
tmp = xdmalloc (sizeof (function_stack_entry));
tmp->var = NULL;
2  xdebug_superglobals.c
View
@@ -97,7 +97,7 @@ static int dump_hash_elem_va(void *pDest XDEBUG_ZEND_HASH_APPLY_TSRMLS_DC, int n
if (hash_key->nKeyLength == 0) {
dump_hash_elem(*((zval **) pDest), name, hash_key->h, NULL, html, str TSRMLS_CC);
} else {
- dump_hash_elem(*((zval **) pDest), name, 0, hash_key->arKey, html, str TSRMLS_CC);
+ dump_hash_elem(*((zval **) pDest), name, 0, (char *) hash_key->arKey, html, str TSRMLS_CC);
}
return SUCCESS;
59 xdebug_var.c
View
@@ -213,15 +213,15 @@ zval* xdebug_get_php_symbol(char* name, int name_length)
char* xdebug_get_property_info(char *mangled_property, int mangled_len, char **property_name, char **class_name)
{
- char *prop_name, *cls_name;
+ const char *prop_name, *cls_name;
#if PHP_VERSION_ID >= 50200
zend_unmangle_property_name(mangled_property, mangled_len - 1, &cls_name, &prop_name);
#else
zend_unmangle_property_name(mangled_property, &cls_name, &prop_name);
#endif
- *property_name = prop_name;
- *class_name = cls_name;
+ *property_name = (char *) prop_name;
+ *class_name = (char *) cls_name;
if (cls_name) {
if (cls_name[0] == '*') {
return "protected";
@@ -303,7 +303,7 @@ static int xdebug_array_element_export(zval **zv XDEBUG_ZEND_HASH_APPLY_TSRMLS_D
int newlen = 0;
char *tmp, *tmp2;
- tmp = php_str_to_str(hash_key->arKey, hash_key->nKeyLength, "'", 1, "\\'", 2, &newlen);
+ tmp = php_str_to_str((char *) hash_key->arKey, hash_key->nKeyLength, "'", 1, "\\'", 2, &newlen);
tmp2 = php_str_to_str(tmp, newlen - 1, "\0", 1, "\\0", 2, &newlen);
if (tmp) {
efree(tmp);
@@ -345,7 +345,7 @@ static int xdebug_object_element_export(zval **zv XDEBUG_ZEND_HASH_APPLY_TSRMLS_
options->runtime[level].current_element_nr < options->runtime[level].end_element_nr)
{
if (hash_key->nKeyLength != 0) {
- modifier = xdebug_get_property_info(hash_key->arKey, hash_key->nKeyLength, &prop_name, &prop_class_name);
+ modifier = xdebug_get_property_info((char *) hash_key->arKey, hash_key->nKeyLength, &prop_name, &prop_class_name);
if (strcmp(modifier, "private") != 0 || strcmp(class_name, prop_class_name) == 0) {
xdebug_str_add(str, xdebug_sprintf("%s $%s = ", modifier, prop_name), 1);
} else {
@@ -434,7 +434,7 @@ void xdebug_var_export(zval **struc, xdebug_str *str, int level, int debug_zval,
char *class_name;
zend_uint class_name_len;
- zend_get_object_classname(*struc, &class_name, &class_name_len TSRMLS_CC);
+ zend_get_object_classname(*struc, (const char **) &class_name, &class_name_len TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("class %s { ", class_name), 1);
if (level <= options->max_depth) {
@@ -460,7 +460,7 @@ void xdebug_var_export(zval **struc, xdebug_str *str, int level, int debug_zval,
case IS_RESOURCE: {
char *type_name;
- type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
+ type_name = (char *) zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("resource(%ld) of type (%s)", Z_LVAL_PP(struc), type_name ? type_name : "Unknown"), 1);
break;
}
@@ -532,7 +532,7 @@ static void xdebug_var_synopsis(zval **struc, xdebug_str *str, int level, int de
char *class_name;
zend_uint class_name_len;
- zend_get_object_classname(*struc, &class_name, &class_name_len TSRMLS_CC);
+ zend_get_object_classname(*struc, (const char **) &class_name, &class_name_len TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("class %s", class_name), 1);
efree(class_name);
break;
@@ -541,7 +541,7 @@ static void xdebug_var_synopsis(zval **struc, xdebug_str *str, int level, int de
case IS_RESOURCE: {
char *type_name;
- type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
+ type_name = (char *) zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("resource(%ld) of type (%s)", Z_LVAL_PP(struc), type_name ? type_name : "Unknown"), 1);
break;
}
@@ -614,7 +614,7 @@ static int xdebug_array_element_export_text_ansi(zval **zv XDEBUG_ZEND_HASH_APPL
int newlen = 0;
char *tmp, *tmp2;
- tmp = php_str_to_str(hash_key->arKey, hash_key->nKeyLength, "'", 1, "\\'", 2, &newlen);
+ tmp = php_str_to_str((char *) hash_key->arKey, hash_key->nKeyLength, "'", 1, "\\'", 2, &newlen);
tmp2 = php_str_to_str(tmp, newlen - 1, "\0", 1, "\\0", 2, &newlen);
if (tmp) {
efree(tmp);
@@ -657,7 +657,7 @@ static int xdebug_object_element_export_text_ansi(zval **zv XDEBUG_ZEND_HASH_APP
xdebug_str_add(str, xdebug_sprintf("%*s", (level * 2), ""), 1);
if (hash_key->nKeyLength != 0) {
- modifier = xdebug_get_property_info(hash_key->arKey, hash_key->nKeyLength, &prop_name, &class_name);
+ modifier = xdebug_get_property_info((char *) hash_key->arKey, hash_key->nKeyLength, &prop_name, &class_name);
xdebug_str_add(str, xdebug_sprintf("%s%s%s%s%s $%s %s=>%s\n",
ANSI_COLOR_MODIFIER, ANSI_COLOR_BOLD, modifier, ANSI_COLOR_BOLD_OFF, ANSI_COLOR_RESET,
prop_name, ANSI_COLOR_POINTER, ANSI_COLOR_RESET), 1);
@@ -745,7 +745,7 @@ void xdebug_var_export_text_ansi(zval **struc, xdebug_str *str, int mode, int le
char *class_name;
zend_uint class_name_len;
- zend_get_object_classname(*struc, &class_name, &class_name_len TSRMLS_CC);
+ zend_get_object_classname(*struc, (const char **) &class_name, &class_name_len TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("%sclass%s %s%s%s#%d (%s%d%s) {\n", ANSI_COLOR_BOLD, ANSI_COLOR_BOLD_OFF, ANSI_COLOR_OBJECT, class_name, ANSI_COLOR_RESET,
Z_OBJ_HANDLE_PP(struc),
ANSI_COLOR_LONG, myht->nNumOfElements, ANSI_COLOR_RESET), 1);
@@ -769,7 +769,7 @@ void xdebug_var_export_text_ansi(zval **struc, xdebug_str *str, int mode, int le
case IS_RESOURCE: {
char *type_name;
- type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
+ type_name = (char *) zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("%sresource%s(%s%ld%s) of type (%s)", ANSI_COLOR_BOLD, ANSI_COLOR_BOLD_OFF,
ANSI_COLOR_RESOURCE, Z_LVAL_PP(struc), ANSI_COLOR_RESET, type_name ? type_name : "Unknown"), 1);
break;
@@ -843,7 +843,7 @@ static void xdebug_var_synopsis_text_ansi(zval **struc, xdebug_str *str, int mod
char *class_name;
zend_uint class_name_len;
- zend_get_object_classname(*struc, &class_name, &class_name_len TSRMLS_CC);
+ zend_get_object_classname(*struc, (const char **) &class_name, &class_name_len TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("class %s", class_name), 1);
break;
}
@@ -851,7 +851,7 @@ static void xdebug_var_synopsis_text_ansi(zval **struc, xdebug_str *str, int mod
case IS_RESOURCE: {
char *type_name;
- type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
+ type_name = (char *) zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("resource(%s%ld%s) of type (%s)", ANSI_COLOR_LONG, Z_LVAL_PP(struc), ANSI_COLOR_RESET, type_name ? type_name : "Unknown"), 1);
break;
}
@@ -894,11 +894,6 @@ typedef struct
zval *zv;
} xdebug_object_item;
-static void xdebug_hash_object_item_dtor(void *data)
-{
- xdfree(data);
-}
-
static int object_item_add_to_merged_hash(zval **zv XDEBUG_ZEND_HASH_APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
{
HashTable *merged;
@@ -911,7 +906,7 @@ static int object_item_add_to_merged_hash(zval **zv XDEBUG_ZEND_HASH_APPLY_TSRML
item = xdmalloc(sizeof(xdebug_object_item));
item->type = object_type;
item->zv = *zv;
- item->name = hash_key->arKey;
+ item->name = (char *) hash_key->arKey;
item->name_len = hash_key->nKeyLength;
zend_hash_next_index_insert(merged, &item, sizeof(xdebug_object_item*), NULL);
@@ -934,7 +929,7 @@ static int object_item_add_zend_prop_to_merged_hash(zend_property_info *zpp XDEB
item = xdmalloc(sizeof(xdebug_object_item));
item->type = object_type;
item->zv = ce->static_members_table[zpp->offset];
- item->name = zpp->name;
+ item->name = (char *) zpp->name;
item->name_len = zpp->name_length;
zend_hash_next_index_insert(merged, &item, sizeof(xdebug_object_item*), NULL);
@@ -1097,7 +1092,7 @@ void xdebug_attach_property_with_contents(zend_property_info *prop_info XDEBUG_Z
}
(*children_count)++;
- modifier = xdebug_get_property_info(prop_info->name, prop_info->name_length, &prop_name, &prop_class_name);
+ modifier = xdebug_get_property_info((char *) prop_info->name, prop_info->name_length, &prop_name, &prop_class_name);
if (strcmp(modifier, "private") != 0 || strcmp(class_name, prop_class_name) == 0) {
contents = xdebug_get_zval_value_xml_node_ex(prop_name, class_entry->static_members_table[prop_info->offset], XDEBUG_VAR_TYPE_STATIC, options TSRMLS_CC);
@@ -1111,14 +1106,14 @@ void xdebug_attach_property_with_contents(zend_property_info *prop_info XDEBUG_Z
xdebug_xml_add_attribute_ex(contents, "facet", xdebug_sprintf("static %s", modifier), 0, 1);
xdebug_xml_add_child(node, contents);
} else {
- xdebug_attach_uninitialized_var(node, prop_info->name);
+ xdebug_attach_uninitialized_var(node, (char *) prop_info->name);
}
}
#else
void xdebug_attach_static_var_with_contents(zval **zv XDEBUG_ZEND_HASH_APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
{
xdebug_xml_node *node;
- char *name = hash_key->arKey;
+ char *name = (char *) hash_key->arKey;
char *modifier;
xdebug_xml_node *contents = NULL;
char *class_name;
@@ -1151,7 +1146,7 @@ void xdebug_attach_static_var_with_contents(zval **zv XDEBUG_ZEND_HASH_APPLY_TSR
}
#endif
-int xdebug_attach_static_vars(xdebug_xml_node *node, xdebug_var_export_options *options, zend_class_entry *ce TSRMLS_DC)
+void xdebug_attach_static_vars(xdebug_xml_node *node, xdebug_var_export_options *options, zend_class_entry *ce TSRMLS_DC)
{
#if PHP_VERSION_ID >= 50400
HashTable *static_members = &ce->properties_info;
@@ -1249,7 +1244,7 @@ void xdebug_var_export_xml_node(zval **struc, char *name, xdebug_xml_node *node,
ALLOC_HASHTABLE(merged_hash);
zend_hash_init(merged_hash, 128, NULL, NULL, 0);
- zend_get_object_classname(*struc, &class_name, &class_name_len TSRMLS_CC);
+ zend_get_object_classname(*struc, (const char **) &class_name, &class_name_len TSRMLS_CC);
ce = zend_fetch_class(class_name, strlen(class_name), ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
#if PHP_VERSION_ID >= 50400
@@ -1301,7 +1296,7 @@ void xdebug_var_export_xml_node(zval **struc, char *name, xdebug_xml_node *node,
char *type_name;
xdebug_xml_add_attribute(node, "type", "resource");
- type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
+ type_name = (char *) zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
xdebug_xml_add_text(node, xdebug_sprintf("resource id='%ld' type='%s'", Z_LVAL_PP(struc), type_name ? type_name : "Unknown"));
break;
}
@@ -1383,7 +1378,7 @@ static int xdebug_array_element_export_fancy(zval **zv XDEBUG_ZEND_HASH_APPLY_TS
xdebug_str_add(str, xdebug_sprintf("%ld <font color='%s'>=&gt;</font> ", hash_key->h, COLOR_POINTER), 1);
} else { /* string key */
xdebug_str_addl(str, "'", 1, 0);
- tmp_str = xdebug_xmlize(hash_key->arKey, hash_key->nKeyLength - 1, &newlen);
+ tmp_str = xdebug_xmlize((char *) hash_key->arKey, hash_key->nKeyLength - 1, &newlen);
xdebug_str_addl(str, tmp_str, newlen, 0);
efree(tmp_str);
xdebug_str_add(str, xdebug_sprintf("' <font color='%s'>=&gt;</font> ", COLOR_POINTER), 1);
@@ -1420,7 +1415,7 @@ static int xdebug_object_element_export_fancy(zval **zv XDEBUG_ZEND_HASH_APPLY_T
xdebug_str_add(str, xdebug_sprintf("%*s", (level * 4) - 2, ""), 1);
if (hash_key->nKeyLength != 0) {
- modifier = xdebug_get_property_info(hash_key->arKey, hash_key->nKeyLength, &prop_name, &prop_class_name);
+ modifier = xdebug_get_property_info((char *) hash_key->arKey, hash_key->nKeyLength, &prop_name, &prop_class_name);
if (strcmp(modifier, "private") != 0 || strcmp(class_name, prop_class_name) == 0) {
xdebug_str_add(str, xdebug_sprintf("<i>%s</i> '%s' <font color='%s'>=&gt;</font> ", modifier, prop_name, COLOR_POINTER), 1);
} else {
@@ -1531,7 +1526,7 @@ void xdebug_var_export_fancy(zval **struc, xdebug_str *str, int level, int debug
case IS_RESOURCE: {
char *type_name;
- type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
+ type_name = (char *) zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("<b>resource</b>(<i>%ld</i><font color='%s'>,</font> <i>%s</i>)", Z_LVAL_PP(struc), COLOR_RESOURCE, type_name ? type_name : "Unknown"), 1);
break;
}
@@ -1610,7 +1605,7 @@ static void xdebug_var_synopsis_fancy(zval **struc, xdebug_str *str, int level,
case IS_RESOURCE: {
char *type_name;
- type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
+ type_name = (char *) zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC);
xdebug_str_add(str, xdebug_sprintf("<font color='%s'>resource(%ld, %s)</font>", COLOR_RESOURCE, Z_LVAL_PP(struc), type_name ? type_name : "Unknown"), 1);
break;
}
2  xdebug_var.h
View
@@ -72,7 +72,7 @@ char* xdebug_get_zval_value_text_ansi(zval *val, int mode, int debug_zval, xdebu
char* xdebug_get_zval_value_xml(char *name, zval *val);
char* xdebug_get_zval_value_fancy(char *name, zval *val, int *len, int debug_zval, xdebug_var_export_options *options TSRMLS_DC);
-int xdebug_attach_static_vars(xdebug_xml_node *node, xdebug_var_export_options *options, zend_class_entry *ce TSRMLS_DC);
+void xdebug_attach_static_vars(xdebug_xml_node *node, xdebug_var_export_options *options, zend_class_entry *ce TSRMLS_DC);
void xdebug_attach_uninitialized_var(xdebug_xml_node *node, char *name);
void xdebug_attach_static_var_with_contents(zval **zv XDEBUG_ZEND_HASH_APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key);
#define xdebug_get_zval_value_xml_node(name, val, options) xdebug_get_zval_value_xml_node_ex(name, val, XDEBUG_VAR_TYPE_NORMAL, options)
Please sign in to comment.
Something went wrong with that request. Please try again.