[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] warnings with gl_anylinked_list
From: |
Ralf Wildenhues |
Subject: |
Re: [bug-gnulib] warnings with gl_anylinked_list |
Date: |
Tue, 10 Oct 2006 14:53:52 +0200 |
User-agent: |
Mutt/1.5.13 (2006-09-08) |
* Bruno Haible wrote on Tue, Oct 10, 2006 at 02:46:26PM CEST:
> Eric Blake wrote:
> > In file included from gl_linkedhash_list.c:89:
> > gl_anylinked_list2.h: In function `gl_linked_indexof_from_to':
> > gl_anylinked_list2.h:431: warning: declaration of 'index' shadows a
> > previous local
> > OK to install the following to silence -Wshadow?
> Thanks for the report. It was quite a luck that the references to 'index'
> always referred to the intended variable.
If you really want to silence -Wshadow, you should not used `index' at
all: eventually, you'll be including strings.h and getting warnings due
to this (seen on GNU/Linux):
| NAME
| index, rindex - locate character in string
|
| SYNOPSIS
| #include <strings.h>
|
| char *index(const char *s, int c);
[...]
| CONFORMING TO
| 4.3BSD
Cheers,
Ralf