include/net/netns/generic.h: In function ‘net_generic’: include/net/netns/generic.h:40:2: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Seen with gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2). Ensure everywhere that stores or compares a net ID uses a signed int. Signed-off-by: Chuck Lever <chuck.le...@oracle.com> --- include/net/netns/generic.h | 2 +- net/core/net_namespace.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/netns/generic.h b/include/net/netns/generic.h index 0931618..d508392 100644 --- a/include/net/netns/generic.h +++ b/include/net/netns/generic.h @@ -25,7 +25,7 @@ */ struct net_generic { - unsigned int len; + int len; struct rcu_head rcu; void *ptr[0]; diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 42f1e1c..f264152 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -34,7 +34,7 @@ EXPORT_SYMBOL(init_net); #define INITIAL_NET_GEN_PTRS 13 /* +1 for len +2 for rcu_head */ -static unsigned int max_gen_ptrs = INITIAL_NET_GEN_PTRS; +static int max_gen_ptrs = INITIAL_NET_GEN_PTRS; static struct net_generic *net_alloc_generic(void) { @@ -490,7 +490,7 @@ again: } return error; } - max_gen_ptrs = max_t(unsigned int, max_gen_ptrs, *ops->id); + max_gen_ptrs = max_t(int, max_gen_ptrs, *ops->id); } error = __register_pernet_operations(list, ops); if (error) { ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired