linux_dsm_epyc7002/tools/perf/ui/browsers
Arnaldo Carvalho de Melo da2019633f 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 <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: c298304bd7 ("perf annotate: Use a ops table for annotation_line__write()")
Link: https://lkml.kernel.org/n/tip-f9nexro58q62l3o9hez8hr0i@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-05-28 18:37:44 -03:00
..
annotate.c perf annotate TUI browser: Do not use member from variable within its own initialization 2019-05-28 18:37:44 -03:00
Build perf report: Implement browsing of individual samples 2019-03-11 16:33:19 -03:00
header.c perf tools: Replace automatic const char[] variables by statics 2019-01-21 15:15:57 -03:00
hists.c perf report: Implement browsing of individual samples 2019-03-11 16:33:19 -03:00
hists.h perf hists browser: Pass annotation_options from tool to browser 2018-06-04 10:28:53 -03:00
map.c perf symbols: Remove include map.h from dso.h 2019-01-25 15:12:09 +01:00
map.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
res_sample.c perf ui browser: Fix ui popup argv browser for many entries 2019-03-11 16:33:20 -03:00
scripts.c perf tools report: Add custom scripts to script menu 2019-03-11 16:33:20 -03:00