lkml.org 
[lkml]   [2014]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/5] perf test: squelch warnings about undefined sizeof
Date
perf test emits the following warnings on the parse events test:

$ perf test
5: parse events tests
Warning: function sizeof not defined
Warning: function sizeof not defined
Warning: function sizeof not defined
Warning: function sizeof not defined
Warning: function sizeof not defined
Warning: function sizeof not defined
Warning: function sizeof not defined
Warning: function sizeof not defined
...

Squelch the warnings by explicitly ignoring the sizeof function.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
Probably incorrect.

tools/lib/traceevent/event-parse.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 567d9ba..06c269a 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -2783,6 +2783,10 @@ process_function(struct event_format *event, struct print_arg *arg,
} else if (strcmp(token, "__get_dynamic_array") == 0) {
free_token(token);
return process_dynamic_array(event, arg, tok);
+ } else if (strcmp(token, "sizeof") == 0) {
+ /* ignore sizeof function */
+ free_token(token);
+ return 0;
}

func = find_func_handler(event->pevent, token);
--
1.9.0.431.g014438b


\
 
 \ /
  Last update: 2014-03-18 00:01    [W:0.130 / U:1.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site