]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
trace: add gcc printf check to trace_seq_printf
authorSteven Rostedt <srostedt@redhat.com>
Fri, 16 Jan 2009 01:50:54 +0000 (20:50 -0500)
committerIngo Molnar <mingo@elte.hu>
Fri, 16 Jan 2009 11:17:29 +0000 (12:17 +0100)
Andrew Morton suggested adding a printf checker to trace_seq_printf
since there are a number of users that have improper format arguments.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_output.h

index b2c14615e0cd8eba8f63ea8fdaa2e9bd508e129a..1cbab5e3dc99db87992c1016bf17df339ae567c6 100644 (file)
@@ -16,7 +16,8 @@ struct trace_event {
        trace_print_func        binary;
 };
 
-extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
+extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
+       __attribute__ ((format (printf, 2, 3)));
 extern int
 seq_print_ip_sym(struct trace_seq *s, unsigned long ip,
                unsigned long sym_flags);