summaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorDavid Ahern <david.ahern@oracle.com>2015-03-11 10:36:20 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-03-12 12:40:00 -0300
commit6d4a48968bfb5c67002f253fbaeb5acd41d7897a (patch)
tree787a62ff1fc97d5dd4e0f2eba89ac467e132ce34 /tools/perf/util
parenta8cd1f4393032cd87e98803346865cdbceb15ad3 (diff)
downloadop-kernel-dev-6d4a48968bfb5c67002f253fbaeb5acd41d7897a.zip
op-kernel-dev-6d4a48968bfb5c67002f253fbaeb5acd41d7897a.tar.gz
perf probe: Fix compiles due to declarations using perf_probe_point
perf fails to build with gcc "(GCC) 4.4.7 20120313 (Red Hat 4.4.7-4.0.9)" (a.k.a., RHEL6 / CentOS 6 / OL 6): cc1: warnings being treated as errors util/probe-event.c: In function ‘get_alternative_line_range’: util/probe-event.c:359: error: missing initializer util/probe-event.c:359: error: (near initialization for ‘pp.file’) util/probe-event.c:359: error: missing initializer util/probe-event.c:359: error: (near initialization for ‘result.function’) Fix by bringing in initializers to declaration. Signed-off-by: David Ahern <david.ahern@oracle.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Link: http://lkml.kernel.org/r/1426084580-60780-1-git-send-email-david.ahern@oracle.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/probe-event.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index e2bf620..f272a71 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -356,12 +356,14 @@ static int get_alternative_line_range(struct debuginfo *dinfo,
struct line_range *lr,
const char *target, bool user)
{
- struct perf_probe_point pp = { 0 }, result = { 0 };
+ struct perf_probe_point pp = { .function = lr->function,
+ .file = lr->file,
+ .line = lr->start };
+ struct perf_probe_point result;
int ret, len = 0;
- pp.function = lr->function;
- pp.file = lr->file;
- pp.line = lr->start;
+ memset(&result, 0, sizeof(result));
+
if (lr->end != INT_MAX)
len = lr->end - lr->start;
ret = find_alternative_probe_point(dinfo, &pp, &result,
OpenPOWER on IntegriCloud