public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Trace: initialize variable to clear warning
@ 2012-02-28  9:09 Zhengwang Ruan
  2012-02-28 10:27 ` Borislav Petkov
  2012-02-28 14:16 ` Steven Rostedt
  0 siblings, 2 replies; 7+ messages in thread
From: Zhengwang Ruan @ 2012-02-28  9:09 UTC (permalink / raw)
  To: rostedt, fweisbec, mingo; +Cc: linux-kernel, kernel-janitors

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-01  2:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-28  9:09 [PATCH] Trace: initialize variable to clear warning Zhengwang Ruan
2012-02-28 10:27 ` Borislav Petkov
2012-02-28 14:16 ` Steven Rostedt
2012-02-29 22:40   ` Valdis.Kletnieks
2012-03-01  1:09     ` Steven Rostedt
2012-03-01  2:08       ` Zhengwang Ruan
2012-03-01  2:23         ` Valdis.Kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox