From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752404AbbIFPQz (ORCPT ); Sun, 6 Sep 2015 11:16:55 -0400 Received: from 78-32-181-23.static.enta.net ([78.32.181.23]:50641 "EHLO mail.linicks.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750867AbbIFPQt (ORCPT ); Sun, 6 Sep 2015 11:16:49 -0400 Message-ID: <55EC58DF.6020501@linicks.net> Date: Sun, 06 Sep 2015 16:16:47 +0100 From: Nick Warne User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Joe Perches CC: linux-kernel@vger.kernel.org Subject: Re: [PATCH] net/core/sysctl_net_core.c unused variable References: <55EC4A03.905@linicks.net> <1441551148.28194.40.camel@perches.com> In-Reply-To: <1441551148.28194.40.camel@perches.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/09/15 15:52, Joe Perches wrote: > On Sun, 2015-09-06 at 15:13 +0100, Nick Warne wrote: >> gcc version 4.8.2 (GCC) warns that 'static int one = 1;' is declared but >> not used in file net/core/sysctl_net_core.c. > > Only when CONFIG_NET isn't set. CONFIG_NET=y Peculiar indeed. >> Reading the file, that is >> the case. Attached is a patch to remove it. > > $ git grep -w -n one net/core/sysctl_net_core.c > net/core/sysctl_net_core.c:26:static int one = 1; > net/core/sysctl_net_core.c:332: .extra2 = &one > >> Signed-off-by: Nick Warne > > Please use grep to augment reading. grep -w -n one net/core/sysctl_net_core.c 26:static int one = 1; ? I just don't have the &one. I am confused now. Nick -- Gosh that takes me back... or is it forward? That's the trouble with time travel, you never can tell." -- Doctor Who "Androids of Tara"