linux-stable/tools
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
..
accounting
arch tools headers UAPI: Sync kvm.h headers with the kernel sources 2019-05-28 09:52:23 -03:00
bpf bpftool: fix BTF raw dump of FWD's fwd_kind 2019-05-17 14:21:29 +02:00
build tools build: Implement libzstd feature check, LIBZSTD_DIR and NO_LIBZSTD defines 2019-04-01 15:18:10 -03:00
cgroup
crypto
debugging
firewire
firmware
gpio
hv
iio Merge 5.0-rc6 into staging-next 2019-02-11 09:25:01 +01:00
include perf script: Pad DSO name for --call-trace 2019-05-28 18:37:44 -03:00
io_uring tools/io_uring: remove IOCQE_FLAG_CACHEHIT 2019-04-08 10:48:50 -06:00
kvm/kvm_stat
laptop
leds
lib perf script: Pad DSO name for --call-trace 2019-05-28 18:37:44 -03:00
memory-model tools/memory-model: Add support for synchronize_srcu_expedited() 2019-04-04 13:48:34 -07:00
nfsd
objtool Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-19 10:23:24 -07:00
pci perf/core improvements and fixes: 2019-05-18 10:24:43 +02:00
pcmcia
perf perf annotate TUI browser: Do not use member from variable within its own initialization 2019-05-28 18:37:44 -03:00
power Merge branch 'x86-mds-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-14 07:57:29 -07:00
scripts
spi
testing Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-05-20 08:21:07 -07:00
thermal/tmon
time
usb
virtio tools/virtio/ringtest: Remove bogus definition of BUG_ON() 2019-05-12 13:11:35 -04:00
vm tools/vm/slabinfo: clean up usage menu debug items 2019-03-05 21:07:20 -08:00
wmi
Makefile