Re: [PATCH] Fix two shadow compiler warnings

Brian Haley <[email protected]> Fri, 15 Aug 2014 17:41:19 -0400
Newsgroups org.kernel.vger.trinity
Message-ID <[email protected]>
On 08/15/2014 05:18 PM, Dave Jones wrote:
> On Fri, Aug 15, 2014 at 05:02:39PM -0400, Brian Haley wrote:
>  >   CC	fd-files.o
>  > fd-files.c: In function ‘list_to_index’:
>  > fd-files.c:216:15: warning: declaration of ‘index’ shadows a global declaration [-Wshadow]
>  >   CC	fds.o
>  > fds.c: In function ‘process_disable_fds_param’:
>  > fds.c:164:38: warning: declaration of ‘optarg’ shadows a global declaration [-Wshadow]
> 
> ugh, what gcc is that with ?
> It seems 4.9.1 is smart enough to figure out that isn't a problem.

My old 12.04.5 LTS system:

gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

-Brian