Skip to contentSkip to conversation

perf tools: Fix a compiling error in probe-event.c for 32 bits machine

PATCH New He Kuang 1 participant 1 message Mar 17, 2015 perf events

lore
Share & tools
lore

He Kuang

author
#0 lore raw

PATCH 1/1 perf tools: Fix a compiling error in probe-event.c for 32 bits machine

On 32 bits machine, there is a compile error:

CC util/probe-event.o
util/probe-event.c: In function 'find_alternative_probe_point':
util/probe-event.c:320:2: error: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'u64' [-Werror=format]
cc1: all warnings being treated as errors
make[3]: *** [util/probe-event.o] Error 1

Fix it by using the PRIx64 for u64.

---
 tools/perf/util/probe-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/probe-event.c +1 -1
index f272a71..c5e1338 100644
@@ -317,7 +317,7 @@ static int find_alternative_probe_point(struct debuginfo *dinfo,
 		ret = -ENOENT;
 		goto out;
 	}
-	pr_debug("Symbol %s address found : %lx\n", pp->function, address);
+	pr_debug("Symbol %s address found : %" PRIx64 "\n", pp->function, address);
 
 	ret = debuginfo__find_probe_point(dinfo, (unsigned long)address,
 					  result);
Signature · 1 line
2.2.0.33.gc18b867