提交 48dd0fed 编写于 作者: J Jaswinder Singh Rajput 提交者: Ingo Molnar

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: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
Acked-by: NSteven Rostedt <rostedt@goodmis.org>
LKML-Reference: <new-submission>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 22a7c31a
......@@ -541,7 +541,7 @@ int register_ftrace_event(struct trace_event *event)
INIT_LIST_HEAD(&event->list);
if (!event->type) {
struct list_head *list;
struct list_head *list = NULL;
if (next_event_type > FTRACE_MAX_EVENT) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册