Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
longxinH committed Aug 8, 2018
1 parent 6507a35 commit 2522d0d
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions extension/xhprof.c
Expand Up @@ -309,11 +309,6 @@ PHP_RSHUTDOWN_FUNCTION(xhprof)
*/
PHP_MINFO_FUNCTION(xhprof)
{
char buf[SCRATCH_BUF_LEN];
char tmp[SCRATCH_BUF_LEN];
int i;
int len;

php_info_print_table_start();
php_info_print_table_header(2, "xhprof support", "enabled");
php_info_print_table_row(2, "Version", XHPROF_VERSION);
Expand Down Expand Up @@ -503,7 +498,7 @@ void hp_clean_profiler_state()
* @param entry hp_entry
* @author veeve
*/
size_t hp_get_entry_name(hp_entry_t *entry)
char* hp_get_entry_name(hp_entry_t *entry)
{
char *result_buf;

Expand Down Expand Up @@ -792,7 +787,6 @@ void hp_sample_stack(hp_entry_t **entries)
add_assoc_string(&XHPROF_G(stats_count), key, symbol);

efree(symbol);
return;
}

/**
Expand Down Expand Up @@ -824,8 +818,6 @@ void hp_sample_check(hp_entry_t **entries)
/* sample the stack */
hp_sample_stack(entries);
}

return;
}


Expand Down Expand Up @@ -873,8 +865,6 @@ static void incr_us_interval(struct timeval *start, uint64 incr)
incr += (start->tv_sec * 1000000 + start->tv_usec);
start->tv_sec = incr / 1000000;
start->tv_usec = incr % 1000000;

return;
}

/**
Expand Down Expand Up @@ -954,16 +944,11 @@ void hp_mode_common_beginfn(hp_entry_t **entries, hp_entry_t *current)
*/
void hp_mode_sampled_init_cb()
{
struct timeval now;
uint64 truncated_us;
uint64 truncated_tsc;

/* Init the last_sample in tsc */
XHPROF_G(last_sample_tsc) = cycle_timer();

/* Find the microseconds that need to be truncated */
gettimeofday(&XHPROF_G(last_sample_time), 0);
now = XHPROF_G(last_sample_time);
hp_trunc_time(&XHPROF_G(last_sample_time), XHPROF_G(sampling_interval));

/* Convert sampling interval to ticks */
Expand Down Expand Up @@ -1005,7 +990,7 @@ void hp_mode_hier_beginfn_cb(hp_entry_t **entries, hp_entry_t *current)
*
* @author veeve
*/
void hp_mode_sampled_beginfn_cb(hp_entry_t **entries, hp_entry_t *current)
void hp_mode_sampled_beginfn_cb(hp_entry_t **entries, hp_entry_t *current)
{
/* See if its time to take a sample */
hp_sample_check(entries);
Expand Down Expand Up @@ -1454,7 +1439,6 @@ zend_string *hp_pcre_match(char *pattern, int len, zval *data, zend_ulong idx)

zend_string *hp_pcre_replace(char *pattern, int len, zval *repl, zval *data, int limit)
{
zval subparts;
pcre_cache_entry *pce_regexp;
zend_string *pattern_str, *replace;

Expand Down

0 comments on commit 2522d0d

Please sign in to comment.