Skip to contentSkip to conversation

tun: signedness warning

PATCH Applied Gerrit Renker 2 participants 2 messages Jan 1, 2009 – Jan 5, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tun: signedness warning

tun: Eliminate sparse signedness warning

register_pernet_gen_device() expects 'int*', found via sparse.

CHECK drivers/net/tun.c
drivers/net/tun.c:1245:36: warning: incorrect type in argument 1 (different signedness)
drivers/net/tun.c:1245:36: expected int *id
drivers/net/tun.c:1245:36: got unsigned int static [toplevel] *<noident>

---
 tun.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/tun.c +1 -1
@@ -213,7 +213,7 @@ static int check_filter(struct tap_filter *filter, const struct sk_buff *skb)
 
 /* Network device part of the driver */
 
-static unsigned int tun_net_id;
+static int tun_net_id;
 struct tun_net {
 	struct list_head dev_list;
 };
maintainer Applied
#1 lore raw

From: Gerrit Renker <[email protected]>
Date: Thu, 1 Jan 2009 11:55:57 +0100

Quoted 10 lines

tun: Eliminate sparse signedness warning

register_pernet_gen_device() expects 'int*', found via sparse.

CHECK drivers/net/tun.c
drivers/net/tun.c:1245:36: warning: incorrect type in argument 1 (different signedness)
drivers/net/tun.c:1245:36: expected int *id
drivers/net/tun.c:1245:36: got unsigned int static [toplevel] *<noident>

Applied, thanks Gerrit.