lkml.org 
[lkml]   [2012]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Trace: initialize variable to clear warning
Date
GCC warns that 'page2' is used without being initialized previously before
being used, this is to clear it.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
---
kernel/trace/trace.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index a3f1bc5..47376ba 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3694,7 +3694,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
int nr_pages = 1;
ssize_t written;
void *page1;
- void *page2;
+ void *uninitialized_var(page2);
int offset;
int size;
int len;
--
1.6.0.4


\
 
 \ /
  Last update: 2012-02-28 10:11    [from the cache]
©2003-2011 Jasper Spaans