[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1516659460-31733-1-git-send-email-mathieu.poirier@linaro.org>
Date: Mon, 22 Jan 2018 15:17:40 -0700
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: acme@...nel.org
Cc: peterz@...radead.org, mingo@...hat.com,
alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
namhyung@...nel.org, kim.phillips@....com,
linux-kernel@...r.kernel.org
Subject: [PATCH] perf tools: Fixing uninitialised variable
When working natively on arm64 the compiler gets pesky and complains
that variable 'i' is uninitialised, something that breaks the
compilation. Here no further checks are needed since variable 'found_spe'
can only be true if variable 'i' has been initialised as part of the for
loop.
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
---
tools/perf/arch/arm/util/auxtrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c
index 2323581b157d..fa639e3e52ac 100644
--- a/tools/perf/arch/arm/util/auxtrace.c
+++ b/tools/perf/arch/arm/util/auxtrace.c
@@ -68,7 +68,7 @@ struct auxtrace_record
bool found_spe = false;
static struct perf_pmu **arm_spe_pmus = NULL;
static int nr_spes = 0;
- int i;
+ int i = 0;
if (!evlist)
return NULL;
--
2.7.4
Powered by blists - more mailing lists