From 823c7164a92a6347d46bb64aaae728b6d08f3bb8 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 31 Jan 2011 19:45:38 -0200 Subject: [PATCH] perf probe: Use %td for pointer arithmetic result MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit %td is for ptrdiff_t, avoiding this warning on 32-bit: cc1: warnings being treated as errors builtin-probe.c: In function ‘opt_set_filter’: builtin-probe.c:176:4: error: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘int’ Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Zanussi LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index fcde0031085f..2c0e64d0b4aa 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -173,7 +173,7 @@ static int opt_set_filter(const struct option *opt __used, strfilter__delete(params.filter); params.filter = strfilter__new(str, &err); if (!params.filter) { - pr_err("Filter parse error at %ld.\n", err - str + 1); + pr_err("Filter parse error at %td.\n", err - str + 1); pr_err("Source: \"%s\"\n", str); pr_err(" %*c\n", (int)(err - str + 1), '^'); return -EINVAL; -- 2.20.1