提交 be3e4581 编写于 作者: D Daniel Borkmann 提交者: David S. Miller

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: NDaniel Borkmann <dborkman@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ee1bec9b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册