proftool: Remove unused variables in make_flame_tree

With clang-15 we now get reported that in the make_flame_tree function,
neither the missing_count nor depth variables are used, only
incremenete/decremented. Remove these.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Tom Rini 2023-02-27 17:08:38 -05:00
parent a6b8dd8a12
commit d9ab69d736

View file

@ -1713,18 +1713,11 @@ static int make_flame_tree(enum out_format_t out_format,
struct flame_state state; struct flame_state state;
struct flame_node *tree; struct flame_node *tree;
struct trace_call *call; struct trace_call *call;
int missing_count = 0; int i;
int i, depth;
/* maintain a stack of start times, etc. for 'calling' functions */ /* maintain a stack of start times, etc. for 'calling' functions */
state.stack_ptr = 0; state.stack_ptr = 0;
/*
* The first thing in the trace may not be the top-level function, so
* set the initial depth so that no function goes below depth 0
*/
depth = -calc_min_depth();
tree = create_node("tree"); tree = create_node("tree");
if (!tree) if (!tree)
return -1; return -1;
@ -1736,16 +1729,10 @@ static int make_flame_tree(enum out_format_t out_format,
ulong timestamp = call->flags & FUNCF_TIMESTAMP_MASK; ulong timestamp = call->flags & FUNCF_TIMESTAMP_MASK;
struct func_info *func; struct func_info *func;
if (entry)
depth++;
else
depth--;
func = find_func_by_offset(call->func); func = find_func_by_offset(call->func);
if (!func) { if (!func) {
warn("Cannot find function at %lx\n", warn("Cannot find function at %lx\n",
text_offset + call->func); text_offset + call->func);
missing_count++;
continue; continue;
} }