[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: relocatable: avoid compiler warnings (-Wshadow)
From: |
Ben Pfaff |
Subject: |
Re: relocatable: avoid compiler warnings (-Wshadow) |
Date: |
Wed, 23 Jan 2019 14:04:42 -0800 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Wed, Jan 23, 2019 at 10:33:20PM +0100, Akim Demaille wrote:
> Hi,
>
> This is to avoid warnings such as:
>
> bison/lib/relocatable.c: In function 'compute_curr_prefix':
> bison/lib/relocatable.c:285:14: warning: declaration of 'curr_prefix_len'
> shadows a global declaration [-Wshadow]
> size_t curr_prefix_len = cp - curr_installdir;
> ^~~~~~~~~~~~~~~
> bison/lib/relocatable.c:114:15: note: shadowed declaration is here
> static size_t curr_prefix_len;
> ^~~~~~~~~~~~~~~
> bison/lib/relocatable.c:286:13: warning: declaration of 'curr_prefix' shadows
> a global declaration [-Wshadow]
> char *curr_prefix;
> ^~~~~~~~~~~
> bison/lib/relocatable.c:113:14: note: shadowed declaration is here
> static char *curr_prefix;
> ^~~~~~~~~~~
Thanks for looking after this code.