mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] Trace: Add comment to notify a warning caused by a gcc bug
@ 2012-03-01  2:41 Zhengwang Ruan
  0 siblings, 0 replies; only message in thread
From: Zhengwang Ruan @ 2012-03-01  2:41 UTC (permalink / raw)
  To: rostedt, fweisbec, mingo; +Cc: linux-kernel, kernel-janitors

GCC (version < 4.6) warns 'page2' is uninitialized, but this is helpful
to track a real potential bug, simply add comment to note this.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
---
v2: Change fix to add a comment.
---
 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..ef332e6 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 *page2;	/* if you get a warning here, upgrade your gcc to 4.6 */
 	int offset;
 	int size;
 	int len;
-- 
1.6.0.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-01  2:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-01  2:41 [PATCH v2] Trace: Add comment to notify a warning caused by a gcc bug Zhengwang Ruan

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

all inboxes | Powered by JetHome®