[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090417155313.GC8253@elte.hu>
Date: Fri, 17 Apr 2009 17:53:13 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: mathieu.desnoyers@...ymtl.ca, Steven Rostedt <rostedt@...dmis.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: Re: [PATCH 4/4] tracing: avoid warnings from zero-arg tracepoints
* Jeremy Fitzhardinge <jeremy@...p.org> wrote:
> From: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
>
> 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.
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
> ---
> 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; \
This looks like a fix we should pick up straight away. I've applied
it to tip:tracing/ftrace - Steve is it fine with you too?
Ingo
--
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