diff options
author | Jaswinder Singh Rajput <jaswinder@kernel.org> | 2009-05-06 06:15:45 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-06 08:19:16 -0400 |
commit | 48dd0fed90e2b1f1ba87401439b85942181c6df3 (patch) | |
tree | 4be2982fd1697a9834d15b3ba3c70165ef0eee8a /kernel/trace/trace_output.c | |
parent | 22a7c31a9659deaddafbbcec6562d44141e84474 (diff) |
tracing: trace_output.c, fix false positive compiler warning
This compiler warning:
CC kernel/trace/trace_output.o
kernel/trace/trace_output.c: In function ‘register_ftrace_event’:
kernel/trace/trace_output.c:544: warning: ‘list’ may be used uninitialized in this function
Is wrong as 'list' is always initialized - but GCC (4.3.2) does not
recognize this relationship properly.
Work around the warning by initializing the variable to NULL.
[ Impact: fix false positive compiler warning ]
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 5fc51f0f75f..8bd9a2c1a46 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -541,7 +541,7 @@ int register_ftrace_event(struct trace_event *event) | |||
541 | INIT_LIST_HEAD(&event->list); | 541 | INIT_LIST_HEAD(&event->list); |
542 | 542 | ||
543 | if (!event->type) { | 543 | if (!event->type) { |
544 | struct list_head *list; | 544 | struct list_head *list = NULL; |
545 | 545 | ||
546 | if (next_event_type > FTRACE_MAX_EVENT) { | 546 | if (next_event_type > FTRACE_MAX_EVENT) { |
547 | 547 | ||