warnings from recent format patch
Subsystems (4)
Even if you can't run it, please compile and run sparse on your code.
CC [M] net/sunrpc/xprtsock.onet/sunrpc/xprtsock.c: In function ‘xs_format_ipv4_peer_addresses’:net/sunrpc/xprtsock.c:287: warning: too many arguments for format
static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt,
const char *protocol, const char *netid)
{
struct sockaddr_in *addr = xs_addr_in(xprt);
char *buf;
buf = kzalloc(20, GFP_KERNEL);
if (buf) {
snprintf(buf, 20, "pI4", &addr->sin_addr.s_addr);
^
missing %David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Sun, 2 Nov 2008 16:33:11 -0800
Quoted 6 lines
Even if you can't run it, please compile and run sparse on your code.
CC [M]
net/sunrpc/xprtsock.onet/sunrpc/xprtsock.c: In function ‘xs_format_ipv4_peer_addresses’:net/sunrpc/xprtsock.c:287: warning: too many arguments for format
Thanks so much for the patch Stephen, that's so much better than what most people do, which is just whine.
commit e0db4a786bbd73145b4feb45c75d49b6e60fe72c
Author: David S. Miller <[email protected]> Date: Sun Nov 2 23:57:06 2008 -0800
sunrpc: Fix build warning due to typo in %pI4 format changes.
Noticed by Stephen Hemminger.
net/sunrpc/xprtsock.c +1 -1
@@ -284,7 +284,7 @@ static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt, buf =kzalloc (20 ,GFP_KERNEL );if (buf) { -snprintf (buf,20 ,"pI4" , &addr->sin_addr.s_addr); +snprintf (buf,20 ,"%pI4" , &addr->sin_addr.s_addr); } xprt->address_strings[RPC_DISPLAY_ADDR ] = buf;