lkml.org 
[lkml]   [2015]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v13 04/23] x86/stacktool: Compile-time stack metadata validation
From
Date
On 09/22/2015, 05:46 PM, Josh Poimboeuf wrote:
...
> --- /dev/null
> +++ b/tools/stacktool/elf.c
> @@ -0,0 +1,403 @@
...
> +static struct section *find_section_by_index(struct elf *elf,
> + unsigned int index)
> +{
...
> +}
> +
> +static struct symbol *find_symbol_by_index(struct elf *elf, unsigned int index)
> +{

Hi, on openSUSE, I am getting:

elf.c:45: error: declaration of ‘index’ shadows a global declaration
/usr/include/string.h:487: error: shadowed declaration is here
elf.c: In function ‘find_symbol_by_index’:
elf.c:56: error: declaration of ‘index’ shadows a global declaration
/usr/include/string.h:487: error: shadowed declaration is here

which is index(3):
extern char *index (__const char *__s, int __c)
__THROW __attribute_pure__ __nonnull ((1));

The same here:

> --- /dev/null
> +++ b/tools/stacktool/special.c
> @@ -0,0 +1,199 @@
...
> +static int get_alt_entry(struct elf *elf, struct special_entry *entry,
> + struct section *sec, int index,
> + struct special_alt *alt)
> +{
...
> +int special_get_alts(struct elf *elf, struct list_head *alts)
> +{

I fixed it obviously by s/index/idx/.

thanks,
--
js
suse labs


\
 
 \ /
  Last update: 2015-09-23 14:01    [W:0.149 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site