perf events: Fix false positive build warning with older GCC's
commit55632770d7298835645489828af87f854c47749c
authorIngo Molnar <mingo@elte.hu>
Thu, 18 Mar 2010 15:51:16 +0000 (18 16:51 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 18 Mar 2010 16:03:24 +0000 (18 17:03 +0100)
treef060dac4334f4871e9f79d587ba9552ffb0ffba1
parent7335f75e9ca166044e38a96abad422d8e6e364b5
perf events: Fix false positive build warning with older GCC's

gcc 4.2.1 produces:

 util/probe-event.c: In function 'add_perf_probe_events':
 util/probe-event.c:883: warning: 'tev' may be used uninitialized in this function
 make: *** [util/probe-event.o] Error 1

Newer GCCs get this right.

To work it around, initialize the variable to NULL so that older GCCs see
it as initialized too.

Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100316220612.32050.33806.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/probe-event.c