diff --git a/extension/xhprof.c b/extension/xhprof.c index b41768f4..5828176d 100644 --- a/extension/xhprof.c +++ b/extension/xhprof.c @@ -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); @@ -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; @@ -792,7 +787,6 @@ void hp_sample_stack(hp_entry_t **entries) add_assoc_string(&XHPROF_G(stats_count), key, symbol); efree(symbol); - return; } /** @@ -824,8 +818,6 @@ void hp_sample_check(hp_entry_t **entries) /* sample the stack */ hp_sample_stack(entries); } - - return; } @@ -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; } /** @@ -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 */ @@ -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); @@ -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;