public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Liming Wang <liming.wang@windriver.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	fweisbec@gmail.com, tglx@linutronix.de,
	liming.wang@windriver.com, mingo@elte.hu
Subject: [tip:perf/core] perf tools: Replace %m with %a in sscanf
Date: Wed, 2 Dec 2009 10:44:25 GMT	[thread overview]
Message-ID: <tip-93aaa45a6ad3f983180223601fc663cc551ad499@git.kernel.org> (raw)
In-Reply-To: <1259743374-9950-1-git-send-email-liming.wang@windriver.com>

Commit-ID:  93aaa45a6ad3f983180223601fc663cc551ad499
Gitweb:     http://git.kernel.org/tip/93aaa45a6ad3f983180223601fc663cc551ad499
Author:     Liming Wang <liming.wang@windriver.com>
AuthorDate: Wed, 2 Dec 2009 16:42:54 +0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 2 Dec 2009 10:12:16 +0100

perf tools: Replace %m with %a in sscanf

Not all glibc support %m and it results in a compile error if
%m not supported. Replace it with %a and (float *) casts.

Signed-off-by: Liming Wang <liming.wang@windriver.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: peterz@infradead.org
Cc: mhiramat@redhat.com
LKML-Reference: <1259743374-9950-1-git-send-email-liming.wang@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/util/probe-event.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index e42f3ac..cd7fbda 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -199,8 +199,8 @@ void parse_trace_kprobe_event(const char *str, char **group, char **event,
 		semantic_error("Too less arguments.");
 
 	/* Scan event and group name. */
-	ret = sscanf(argv[0], "%c:%m[^/ \t]/%m[^ \t]",
-		     &pr, group, event);
+	ret = sscanf(argv[0], "%c:%a[^/ \t]/%a[^ \t]",
+		     &pr, (float *)(void *)group, (float *)(void *)event);
 	if (ret != 3)
 		semantic_error("Failed to parse event name: %s", argv[0]);
 	pr_debug("Group:%s Event:%s probe:%c\n", *group, *event, pr);
@@ -211,7 +211,7 @@ void parse_trace_kprobe_event(const char *str, char **group, char **event,
 	pp->retprobe = (pr == 'r');
 
 	/* Scan function name and offset */
-	ret = sscanf(argv[1], "%m[^+]+%d", &pp->function, &pp->offset);
+	ret = sscanf(argv[1], "%a[^+]+%d", (float *)(void *)&pp->function, &pp->offset);
 	if (ret == 1)
 		pp->offset = 0;
 

  reply	other threads:[~2009-12-02 10:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01  0:19 [PATCH -tip 0/9] perf-probe updates Masami Hiramatsu
2009-12-01  0:19 ` [PATCH -tip 1/9] trace_kprobes: Fix a memory leak bug and check kstrdup return value Masami Hiramatsu
2009-12-01  7:31   ` [tip:perf/core] trace_kprobes: Fix a memory leak bug and check kstrdup() " tip-bot for Masami Hiramatsu
2009-12-01  0:19 ` [PATCH -tip 2/9] perf probe: Fix to change a debugging message from pr_info to pr_debug Masami Hiramatsu
2009-12-01  7:31   ` [tip:perf/core] perf probe: Change " tip-bot for Masami Hiramatsu
2009-12-01  0:19 ` [PATCH -tip 3/9] perf probe: Fix to add probe-finder.h without libdwarf Masami Hiramatsu
2009-12-01  7:31   ` [tip:perf/core] perf probe: Add " tip-bot for Masami Hiramatsu
2009-12-01  0:19 ` [PATCH -tip 4/9] perf probe: Fix argv array size in probe parser Masami Hiramatsu
2009-12-01  7:32   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2009-12-01  0:19 ` [PATCH -tip 5/9] perf probe: Fix probe array index for multiple probe point Masami Hiramatsu
2009-12-01  7:32   ` [tip:perf/core] perf probe: Fix probe array index for multiple probe points tip-bot for Masami Hiramatsu
2009-12-01  0:19 ` [PATCH -tip 6/9] perf probe: Move probe event utility functions to probe-event.c Masami Hiramatsu
2009-12-01  7:32   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2009-12-01  0:20 ` [PATCH -tip 7/9] perf probe: Add argv_split() from lib/argv_split.c Masami Hiramatsu
2009-12-01  7:32   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2009-12-02  5:44     ` Wang Liming
2009-12-02  5:51       ` Frederic Weisbecker
2009-12-01  0:20 ` [PATCH -tip 8/9] perf probe: Add --list option for listing current probe events Masami Hiramatsu
2009-12-01  7:32   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2009-12-02  4:12     ` Wang Liming
2009-12-02  4:56       ` Masami Hiramatsu
2009-12-02  5:35         ` Wang Liming
2009-12-02  6:06           ` Frederic Weisbecker
2009-12-02  6:21             ` Wang Liming
2009-12-02  8:31             ` Ingo Molnar
2009-12-02  8:42               ` [PATCH] perf tools: replace %m with %a in sscanf Liming Wang
2009-12-02 10:44                 ` tip-bot for Liming Wang [this message]
2009-12-02 16:45                 ` Masami Hiramatsu
2009-12-01  0:20 ` [PATCH -tip 9/9] perf probe: Simplify event naming Masami Hiramatsu
2009-12-01  7:33   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2009-12-01  7:29 ` [PATCH -tip 0/9] perf-probe updates Ingo Molnar
2009-12-02 21:53   ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-93aaa45a6ad3f983180223601fc663cc551ad499@git.kernel.org \
    --to=liming.wang@windriver.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox