]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
net: sctp: attribute printl with __printf for gcc fmt checks
authorDaniel Borkmann <dborkman@redhat.com>
Wed, 1 May 2013 02:59:23 +0000 (02:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2013 19:04:10 +0000 (15:04 -0400)
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 <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/probe.c

index ad0dba870341239f71c4827257be7248db26a964..e62c22535be424cc53311dfc5b8f4540faa47e59 100644 (file)
@@ -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;