From 4c32b6d6bd657f16e7183cc90db0f85bc35d9e87 Mon Sep 17 00:00:00 2001 From: nanshuaibo Date: Thu, 3 Sep 2026 19:28:34 +0800 Subject: [PATCH] perf sched: Make output_name variable static The output_name variable is only used within builtin-sched.c for the stats subcommand, so declare it static. This fixes a sparse warning: builtin-sched.c:4140:12: warning: symbol 'output_name' was not declared. Should it be static? Reviewed-by: Ian Rogers Signed-off-by: nanshuaibo Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 5b4092ae33ee..6e8bf619c86c 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -4137,7 +4137,7 @@ static int disable_sched_schedstat(void) } /* perf.data or any other output file name used by stats subcommand (only). */ -const char *output_name; +static const char *output_name; static int perf_sched__schedstat_record(struct perf_sched *sched, int argc, const char **argv)