TIPC: fix printk warning
Subsystems (3)
PATCH 1/1 TIPC: fix printk warning
gcc spits out this warning:
net/tipc/link.c: In function ‘link_retransmit_failure’:net/tipc/link.c:1669: warning: cast from pointer to integer of different size
More than a little bit ugly, storing integers in void*, but at least the code is correct, unlike some of the more crufty Linux kernel code found elsewhere.
Rather than having two casts to massage the value into u32, it's easier just to have a single cast and use "%lu", since it's just a printk.
net/tipc/link.c +3 -2
@@ -1666,8 +1666,9 @@ static void link_retransmit_failure(struchar addr_string[16 ];tipc_printf (TIPC_OUTPUT ,"Msg seq number: %u, " ,msg_seqno (msg)); -tipc_printf (TIPC_OUTPUT ,"Outstanding acks: %u\n" , (u32 )TIPC_SKB_CB (buf)->handle); - +tipc_printf (TIPC_OUTPUT ,"Outstanding acks: %lu\n" , + (unsigned long )TIPC_SKB_CB (buf)->handle); + n_ptr = l_ptr->owner->next;tipc_node_lock (n_ptr);
From: Jeff Garzik <[email protected]>
Date: Sun, 1 Oct 2006 12:24:13 -0400
Quoted 6 lines
gcc spits out this warning:
net/tipc/link.c: In function $,1rx(Blink_retransmit_failure$,1ry(B:net/tipc/link.c:1669: warning: cast from pointer to integer of different size
Quoted 8 lines
More than a little bit ugly, storing integers in void*, but at least the code is correct, unlike some of the more crufty Linux kernel code found elsewhere.
Rather than having two casts to massage the value into u32, it's easier just to have a single cast and use "%lu", since it's just a printk.
Signed-off-by Jeff Garzik <[email protected]>
Applied, thanks Jeff.