Skip to content

Commit

Permalink
net: sctp: attribute printl with __printf for gcc fmt checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Borkmann authored and David S. Miller committed May 1, 2013
1 parent ee1bec9 commit be3e458
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sctp/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit be3e458

Please sign in to comment.