Skip to content

Commit

Permalink
Use 'long' data type to find out the last dead code checker ID
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Jan 21, 2015
1 parent cee8ec6 commit 8da0141
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion php_xdebug.h
Expand Up @@ -197,7 +197,7 @@ ZEND_BEGIN_MODULE_GLOBALS(xdebug)
zend_bool code_coverage_dead_code_analysis;
unsigned int function_count;
int dead_code_analysis_tracker_offset;
void *dead_code_last_start_id;
long dead_code_last_start_id;
char *previous_filename;
xdebug_coverage_file *previous_file;

Expand Down
4 changes: 2 additions & 2 deletions xdebug_code_coverage.c
Expand Up @@ -549,7 +549,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(dead_code_analysis_tracker_offset)] < XG(dead_code_last_start_id)) {
if ((long) opa->reserved[XG(dead_code_analysis_tracker_offset)] < XG(dead_code_last_start_id)) {
prefill_from_oparray((char *) opa->filename, opa TSRMLS_CC);
}
}
Expand Down Expand Up @@ -577,7 +577,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(dead_code_analysis_tracker_offset)] < XG(dead_code_last_start_id)) {
if ((long) op_array->reserved[XG(dead_code_analysis_tracker_offset)] < XG(dead_code_last_start_id)) {
prefill_from_oparray((char *) op_array->filename, op_array TSRMLS_CC);
}

Expand Down

0 comments on commit 8da0141

Please sign in to comment.