diff options
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 33803c0b94d6..baec7d887da4 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -2742,14 +2742,16 @@ process_func_handler(struct event_format *event, struct pevent_function_handler | |||
2742 | type = process_arg(event, farg, &token); | 2742 | type = process_arg(event, farg, &token); |
2743 | if (i < (func->nr_args - 1)) { | 2743 | if (i < (func->nr_args - 1)) { |
2744 | if (type != EVENT_DELIM || strcmp(token, ",") != 0) { | 2744 | if (type != EVENT_DELIM || strcmp(token, ",") != 0) { |
2745 | warning("Error: function '%s()' expects %d arguments but event %s only uses %d", | 2745 | do_warning_event(event, |
2746 | "Error: function '%s()' expects %d arguments but event %s only uses %d", | ||
2746 | func->name, func->nr_args, | 2747 | func->name, func->nr_args, |
2747 | event->name, i + 1); | 2748 | event->name, i + 1); |
2748 | goto err; | 2749 | goto err; |
2749 | } | 2750 | } |
2750 | } else { | 2751 | } else { |
2751 | if (type != EVENT_DELIM || strcmp(token, ")") != 0) { | 2752 | if (type != EVENT_DELIM || strcmp(token, ")") != 0) { |
2752 | warning("Error: function '%s()' only expects %d arguments but event %s has more", | 2753 | do_warning_event(event, |
2754 | "Error: function '%s()' only expects %d arguments but event %s has more", | ||
2753 | func->name, func->nr_args, event->name); | 2755 | func->name, func->nr_args, event->name); |
2754 | goto err; | 2756 | goto err; |
2755 | } | 2757 | } |