From: Ingo Molnar Date: Tue, 25 Nov 2008 17:23:03 +0000 (+0100) Subject: netfilter: fix warning in net/netfilter/nf_conntrack_ftp.c X-Git-Tag: firefly_0821_release~16481^2~367^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d6e8cc6cc7ac77b0f9118f78c453a2e834e62709;p=firefly-linux-kernel-4.4.55.git netfilter: fix warning in net/netfilter/nf_conntrack_ftp.c this warning: net/netfilter/nf_conntrack_ftp.c: In function 'help': net/netfilter/nf_conntrack_ftp.c:360: warning: 'matchoff' may be used uninitialized in this function net/netfilter/nf_conntrack_ftp.c:360: warning: 'matchlen' may be used uninitialized in this function triggers because GCC does not recognize the (correct) error flow between find_pattern(), 'found', 'matchoff' and 'matchlen'. Annotate it. Signed-off-by: Ingo Molnar Signed-off-by: Patrick McHardy --- diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c index 867cad6b3c8d..00fecc385f9b 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c @@ -358,7 +358,7 @@ static int help(struct sk_buff *skb, int ret; u32 seq; int dir = CTINFO2DIR(ctinfo); - unsigned int matchlen, matchoff; + unsigned int uninitialized_var(matchlen), uninitialized_var(matchoff); struct nf_ct_ftp_master *ct_ftp_info = &nfct_help(ct)->help.ct_ftp_info; struct nf_conntrack_expect *exp; union nf_inet_addr *daddr;