diff options
author | Ian Rogers <[email protected]> | 2023-07-24 13:12:45 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-07-24 18:23:52 -0300 |
commit | 0f97a3a0deccece93797cd35ba1c18704e94b7e7 (patch) | |
tree | 1780798b51931a14fb1c9ec465b8b7516a450905 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 91f88a0ac8bce5f385ef8c1a6766fce04f7f0043 (diff) |
perf parse-events: Avoid use uninitialized warning
With GCC LTO a potential use uninitialized is spotted:
```
In function ‘parse_events_config_bpf’,
inlined from ‘parse_events_load_bpf’ at util/parse-events.c:874:8:
util/parse-events.c:792:37: error: ‘error_pos’ may be used uninitialized [-Werror=maybe-uninitialized]
792 | idx = term->err_term + error_pos;
| ^
util/parse-events.c: In function ‘parse_events_load_bpf’:
util/parse-events.c:765:13: note: ‘error_pos’ was declared here
765 | int error_pos;
| ^
```
So initialize at declaration.
Reviewed-by: Nick Desaulniers <[email protected]>
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Carsten Haitzler <[email protected]>
Cc: Fangrui Song <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: Xing Zhengjun <[email protected]>
Cc: Yang Jihong <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions