diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2019-05-28 19:02:56 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2019-05-28 21:37:44 +0000 |
| commit | da2019633f0b5c105ce658aada333422d8cb28fe (patch) | |
| tree | cac0cfc982e89bf23206fad8cb1973e02e484607 /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | perf machine: Return NULL instead of null-terminating /proc/version array (diff) | |
| download | kernel-da2019633f0b5c105ce658aada333422d8cb28fe.tar.gz kernel-da2019633f0b5c105ce658aada333422d8cb28fe.zip | |
perf annotate TUI browser: Do not use member from variable within its own initialization
Some compilers will complain when using a member of a struct to
initialize another member, in the same struct initialization.
For instance:
debian:8 Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
oraclelinux:7 clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Produce:
ui/browsers/annotate.c:104:12: error: variable 'ops' is uninitialized when used within its own initialization [-Werror,-Wuninitialized]
(!ops.current_entry ||
^~~
1 error generated.
So use an extra variable, initialized just before that struct, to have
the value used in the expressions used to init two of the struct
members.
Cc: Adrian Hunter <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Fixes: c298304bd747 ("perf annotate: Use a ops table for annotation_line__write()")
Link: https://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
