From: Steven Rostedt Date: Fri, 16 Jan 2009 01:50:54 +0000 (-0500) Subject: trace: add gcc printf check to trace_seq_printf X-Git-Tag: v2.6.30-rc1~2^2~164 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c37abc5515b5ed5b1d2134d2deaead492d9f92a2;p=karo-tx-linux.git trace: add gcc printf check to trace_seq_printf 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 Signed-off-by: Ingo Molnar --- diff --git a/kernel/trace/trace_output.h b/kernel/trace/trace_output.h index b2c14615e0cd..1cbab5e3dc99 100644 --- a/kernel/trace/trace_output.h +++ b/kernel/trace/trace_output.h @@ -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);