Re: [PATCH] netfilter: conntrack: remove uninitialized shadow variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Mon,  9 May 2016 21:47:23 +0200

> A recent commit introduced an unconditional use of an uninitialized
> variable, as reported in this gcc warning:
> 
> net/netfilter/nf_conntrack_core.c: In function '__nf_conntrack_confirm':
> net/netfilter/nf_conntrack_core.c:632:33: error: 'ctinfo' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>    bytes = atomic64_read(&counter[CTINFO2DIR(ctinfo)].bytes);
>                                  ^
> net/netfilter/nf_conntrack_core.c:628:26: note: 'ctinfo' was declared here
>    enum ip_conntrack_info ctinfo;
> 
> The problem is that a local variable shadows the function parameter.
> This removes the local variable, which looks like what Pablo originally
> intended.
> 
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> Fixes: 71d8c47fc653 ("netfilter: conntrack: introduce clash resolution on insertion race")

Applied.
--
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



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux