net: sctp: attribute printl with __printf for gcc fmt checks
Subsystems (3)
PATCH 1/1 net: sctp: attribute printl with __printf for gcc fmt checks
Let GCC check for format string errors in sctp's probe printl function. This patch fixes the warning when compiled with W=1:
net/sctp/probe.c:73:2: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wmissing-format-attribute]
Signed-off-by Daniel Borkmann <[email protected]>
--- net/sctp/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/probe.c +1 -1
@@ -63,7 +63,7 @@ static struct {struct timespec tstart; } sctpw; -static void printl (const char *fmt, ...) +static __printf(1, 2) void printl(const char *fmt, ...) { va_list args;int len;
Signature · 1 line
1.7.11.7
From: Daniel Borkmann <[email protected]>
Date: Wed, 1 May 2013 14:59:23 +0200
Quoted 7 lines
Let GCC check for format string errors in sctp's probe printl function. This patch fixes the warning when compiled with W=1:
net/sctp/probe.c:73:2: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wmissing-format-attribute]Signed-off-by Daniel Borkmann <[email protected]>
Applied.