[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-76aa81118ddfbb3dc31533030cf3ec329dd067a6@git.kernel.org>
Date: Fri, 17 Apr 2009 16:10:38 GMT
From: tip-bot for Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
rostedt@...dmis.org, tglx@...utronix.de, mingo@...e.hu,
jeremy.fitzhardinge@...rix.com
Subject: [tip:tracing/core] tracing: avoid warnings from zero-arg tracepoints
Commit-ID: 76aa81118ddfbb3dc31533030cf3ec329dd067a6
Gitweb: http://git.kernel.org/tip/76aa81118ddfbb3dc31533030cf3ec329dd067a6
Author: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
AuthorDate: Thu, 16 Apr 2009 23:35:39 -0700
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Fri, 17 Apr 2009 17:52:26 +0200
tracing: avoid warnings from zero-arg tracepoints
Tracepoints with no arguments can issue two warnings:
"field" defined by not used
"ret" is uninitialized in this function
Mark field as being OK to leave unused, and initialize ret.
[ Impact: fix false positive compiler warnings. ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Acked-by: Steven Rostedt <rostedt@...dmis.org>
Cc: mathieu.desnoyers@...ymtl.ca
LKML-Reference: <1239950139-1119-5-git-send-email-jeremy@...p.org>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
include/trace/ftrace.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 60c5323..39a3351 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -160,8 +160,8 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
static int \
ftrace_format_##call(struct trace_seq *s) \
{ \
- struct ftrace_raw_##call field; \
- int ret; \
+ struct ftrace_raw_##call field __attribute__((unused)); \
+ int ret = 0; \
\
tstruct; \
\
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists