* [PATCH] net: sctp: attribute printl with __printf for gcc fmt checks
@ 2013-05-01 12:59 Daniel Borkmann
2013-05-01 19:04 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Borkmann @ 2013-05-01 12:59 UTC (permalink / raw)
To: davem; +Cc: netdev
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>
---
net/sctp/probe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index ad0dba8..e62c225 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -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;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: sctp: attribute printl with __printf for gcc fmt checks
2013-05-01 12:59 [PATCH] net: sctp: attribute printl with __printf for gcc fmt checks Daniel Borkmann
@ 2013-05-01 19:04 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-05-01 19:04 UTC (permalink / raw)
To: dborkman; +Cc: netdev
From: Daniel Borkmann <dborkman@redhat.com>
Date: Wed, 1 May 2013 14:59:23 +0200
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-01 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-01 12:59 [PATCH] net: sctp: attribute printl with __printf for gcc fmt checks Daniel Borkmann
2013-05-01 19:04 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).