From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH 1/3] netfilter: nf_tables: avoid uninitialized variable warning Date: Fri, 30 Sep 2016 19:47:49 +0200 Message-ID: <20160930174749.GF1176@salvia> References: <20160930160559.4102745-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Patrick McHardy , Jozsef Kadlecsik , "David S. Miller" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Arnd Bergmann Return-path: Received: from mail.us.es ([193.147.175.20]:32798 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933266AbcI3Rr6 (ORCPT ); Fri, 30 Sep 2016 13:47:58 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 3FE65ED07A for ; Fri, 30 Sep 2016 19:47:56 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 2DD69BAC27 for ; Fri, 30 Sep 2016 19:47:56 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 0F120BAC25 for ; Fri, 30 Sep 2016 19:47:54 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20160930160559.4102745-1-arnd@arndb.de> Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Fri, Sep 30, 2016 at 06:05:34PM +0200, Arnd Bergmann wrote: > The newly added nft_range_eval() function handles the two possible > nft range operations, but as the compiler warning points out, > any unexpected value would lead to the 'mismatch' variable being > used without being initialized: > > net/netfilter/nft_range.c: In function 'nft_range_eval': > net/netfilter/nft_range.c:45:5: error: 'mismatch' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > This can be trivially avoided by added a 'default:' clause. Applied this patch, I took Aaron's and Pai's patches instead. Thanks anyway for following up on this issue Arnd.