aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-11-09 15:40:47 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-11-09 15:42:47 -0500
commit27f94d52394003d444a383eaf8d4824daf32432e (patch)
treed390f9230edac3d9c42a8ad8b030182890b6e609
parent7a905611644c015e68a955f263fd0a4b7b20879d (diff)
tools lib traceevent: Use 'const' in variables pointing to const strings
Fixing the build on fedora 14, 32-bit: tools/lib/traceevent/event-parse.c: In function ‘find_cmdline’: tools/lib/traceevent/event-parse.c:183:3: error: return discards qualifiers from pointer target type tools/lib/traceevent/event-parse.c:186:3: error: return discards qualifiers from pointer target type tools/lib/traceevent/event-parse.c:195:2: error: return discards qualifiers from pointer target type tools/lib/traceevent/event-parse.c: In function ‘process_func_handler’: tools/lib/traceevent/event-parse.c:2658:9: error: assignment discards qualifiers from pointer target type tools/lib/traceevent/event-parse.c:2660:9: error: assignment discards qualifiers from pointer target type tools/lib/traceevent/event-parse.c: In function ‘print_mac_arg’: tools/lib/traceevent/event-parse.c:3892:14: error: initialization discards qualifiers from pointer target type tools/lib/traceevent/event-parse.c:3906:7: error: assignment discards qualifiers from pointer target type tools/lib/traceevent/event-parse.c: In function ‘pevent_print_event’: tools/lib/traceevent/event-parse.c:4412:24: error: initialization discards qualifiers from pointer target type Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/n/tip-0k5g8urwu7vwkgbcbt2x05fe@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/lib/traceevent/event-parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 669953ab32eb..5a824e355d04 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -174,7 +174,7 @@ static int cmdline_init(struct pevent *pevent)
174 return 0; 174 return 0;
175} 175}
176 176
177static char *find_cmdline(struct pevent *pevent, int pid) 177static const char *find_cmdline(struct pevent *pevent, int pid)
178{ 178{
179 const struct cmdline *comm; 179 const struct cmdline *comm;
180 struct cmdline key; 180 struct cmdline key;
@@ -2637,7 +2637,7 @@ process_func_handler(struct event_format *event, struct pevent_function_handler
2637 struct print_arg *farg; 2637 struct print_arg *farg;
2638 enum event_type type; 2638 enum event_type type;
2639 char *token; 2639 char *token;
2640 char *test; 2640 const char *test;
2641 int i; 2641 int i;
2642 2642
2643 arg->type = PRINT_FUNC; 2643 arg->type = PRINT_FUNC;
@@ -3889,7 +3889,7 @@ static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size,
3889 struct event_format *event, struct print_arg *arg) 3889 struct event_format *event, struct print_arg *arg)
3890{ 3890{
3891 unsigned char *buf; 3891 unsigned char *buf;
3892 char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x"; 3892 const char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x";
3893 3893
3894 if (arg->type == PRINT_FUNC) { 3894 if (arg->type == PRINT_FUNC) {
3895 process_defined_func(s, data, size, event, arg); 3895 process_defined_func(s, data, size, event, arg);
@@ -4409,7 +4409,7 @@ void pevent_event_info(struct trace_seq *s, struct event_format *event,
4409void pevent_print_event(struct pevent *pevent, struct trace_seq *s, 4409void pevent_print_event(struct pevent *pevent, struct trace_seq *s,
4410 struct pevent_record *record) 4410 struct pevent_record *record)
4411{ 4411{
4412 static char *spaces = " "; /* 20 spaces */ 4412 static const char *spaces = " "; /* 20 spaces */
4413 struct event_format *event; 4413 struct event_format *event;
4414 unsigned long secs; 4414 unsigned long secs;
4415 unsigned long usecs; 4415 unsigned long usecs;