Jozsef Kadlecsik wrote, at 03/04/2011 05:00 PM: > On Fri, 4 Mar 2011, Shan Wei wrote: > >> net/netfilter/ipset/ip_set_core.c:615: warning: ?clash? may be used uninitialized in this function >> >> Signed-off-by: shanw <shanw@shanw-desktop.(none)> >> --- >> net/netfilter/ipset/ip_set_core.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c >> index 8b1a54c..618a615 100644 >> --- a/net/netfilter/ipset/ip_set_core.c >> +++ b/net/netfilter/ipset/ip_set_core.c >> @@ -612,7 +612,7 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb, >> const struct nlmsghdr *nlh, >> const struct nlattr * const attr[]) >> { >> - struct ip_set *set, *clash; >> + struct ip_set *set, *clash = NULL; >> ip_set_id_t index = IPSET_INVALID_ID; >> struct nlattr *tb[IPSET_ATTR_CREATE_MAX+1] = {}; >> const char *name, *typename; >> -- >> 1.6.3.3 > > Thanks, I applied your patch in my tree. > > Patrick, please apply it too. > > Signed-off-by: Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxxxxxx> > Thanks for your review. Bad sob in first patch, fix it in new one. ================ [PATCH v2] netfilter:ipset: fix the compile warning in ip_set_create net/netfilter/ipset/ip_set_core.c:615: warning: âclashâ may be used uninitialized in this function Signed-off-by: Shan Wei <shanwei@xxxxxxxxxxxxxx> Signed-off-by: Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxxxxxx> --- net/netfilter/ipset/ip_set_core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index 8b1a54c..618a615 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c @@ -612,7 +612,7 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb, const struct nlmsghdr *nlh, const struct nlattr * const attr[]) { - struct ip_set *set, *clash; + struct ip_set *set, *clash = NULL; ip_set_id_t index = IPSET_INVALID_ID; struct nlattr *tb[IPSET_ATTR_CREATE_MAX+1] = {}; const char *name, *typename; -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html