From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761588AbcJ1Pxx (ORCPT ); Fri, 28 Oct 2016 11:53:53 -0400 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:36706 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756719AbcJ1Pwt (ORCPT ); Fri, 28 Oct 2016 11:52:49 -0400 Date: Fri, 28 Oct 2016 17:50:31 +0200 From: Florian Westphal To: Arnd Bergmann Cc: Pablo Neira Ayuso , Patrick McHardy , Jozsef Kadlecsik , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Florian Westphal , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [rfc, netfilter-next] netfilter: nf_tables: fib warnings Message-ID: <20161028155031.GI23011@breakpoint.cc> References: <20161028153124.3773180-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20161028153124.3773180-1-arnd@arndb.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann wrote: > The newly added nft fib code produces two warnings: > > net/ipv4/netfilter/nft_fib_ipv4.c: In function 'nft_fib4_eval': > net/ipv4/netfilter/nft_fib_ipv4.c:80:6: error: unused variable 'i' [-Werror=unused-variable] > net/ipv4/netfilter/nft_fib_ipv4.c: In function ‘nft_fib4_eval’: > net/ipv4/netfilter/nft_fib_ipv4.c:137:6: error: ‘oif’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > > The first one is obvious as the only user of that variable is > inside of an #ifdef, but the second one is a bit trickier. > It is clear that 'oif' is uninitialized here if neither > NFTA_FIB_F_OIF nor NFTA_FIB_F_IIF are set. > > I have no idea how that should be handled, this patch just > returns without doing anything, which may or may not be > the right thing to do. It should be initialized to NULL.