From 66e1c8920ddfc4dfd415e599442b73db177cd975 Mon Sep 17 00:00:00 2001 From: Hailong Liu Date: Thu, 20 Jul 2023 20:12:35 +0800 Subject: [PATCH] pmu_events: Fix a bug for a missing of stack value init Signed-off-by: Hailong Liu --- .../monitor/unity/collector/plugin/pmu_events/pmu_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tools/monitor/unity/collector/plugin/pmu_events/pmu_events.c b/source/tools/monitor/unity/collector/plugin/pmu_events/pmu_events.c index 03aab36a..af6666cd 100644 --- a/source/tools/monitor/unity/collector/plugin/pmu_events/pmu_events.c +++ b/source/tools/monitor/unity/collector/plugin/pmu_events/pmu_events.c @@ -32,7 +32,7 @@ static long perf_event_open(struct perf_event_attr *hw_event, pid_t pid, int create_hw_events(struct pcpu_hw_info *pc_hwi) { int cpu, i, j, group_last, idx_fail; - int ret, pid, group_leader; + int ret = 0, pid, group_leader; struct hw_info *hwi, *leader; unsigned long flags = 0; -- Gitee