[PATCH] perf report: fix compile failure on ppc, 32-bit

From: David Ahern
Date: Mon May 07 2012 - 21:59:29 EST


Builds currently fail with:
CC /tmp/pbuild/builtin-report.o
cc1: warnings being treated as errors
builtin-report.c: In function âhists__fprintf_nr_sample_eventsâ:
builtin-report.c:307: error: format â%luâ expects type âlong unsigned intâ, but argument 3 has type âu64â
make: *** [/tmp/pbuild/builtin-report.o] Error 1

$ rpm -q gcc
gcc-4.4.4-10.fc12.ppc

Signed-off-by: David Ahern <dsahern@xxxxxxxxx>
---
tools/perf/builtin-report.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 5df829f..7477655 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -304,7 +304,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *self,
if (evname != NULL)
ret += fprintf(fp, " of event '%s'", evname);

- ret += fprintf(fp, "\n# Event count (approx.): %lu", nr_events);
+ ret += fprintf(fp, "\n# Event count (approx.): %" PRIu64, nr_events);
return ret + fprintf(fp, "\n#\n");
}

--
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/