Skip to contentSkip to conversation

perf: Fix parameter type mismatch

PATCH New Youquan Song 1 participant 1 message Mar 20, 2013 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: Fix parameter type mismatch

When build the tools/perf, encounter a block issue:
cc1: warnings being treated as errors
util/scripting-engines/trace-event-perl.c: In function ‘perl_process_tracepoint’:
util/scripting-engines/trace-event-perl.c:285: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘__u64’
make: *** [util/scripting-engines/trace-event-perl.o] Error 1

---
 .../perf/util/scripting-engines/trace-event-perl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/scripting-engines/trace-event-perl.c +1 -1
index f80605e..b2b3bdb 100644
@@ -282,7 +282,7 @@ static void perl_process_tracepoint(union perf_event *perf_event __maybe_unused,
 
 	event = find_cache_event(evsel);
 	if (!event)
-		die("ug! no event found for type %" PRIu64, evsel->attr.config);
+		die("ug! no event found for type %" PRIu64, (u64)(evsel->attr.config));
 
 	pid = raw_field_value(event, "common_pid", data);
 
Signature · 1 line
1.7.7.4