Mercurial > gnulib
changeset 37165:46132d5e6afa
glob: avoid -Wattribute warnings on glibc
Colin Watson reported that some versions of gcc warn about the use
of attribute((leaf)) on static functions, since it is documented to
have an effect only on external functions.
* lib/glob.c (next_brace_sub, prefix_array, collated_compare): Use
__THROWNL, not __THROW, on static functions.
* lib/glob.in.h (__THROW): Adjust...
(__THROWNL): ...accordingly.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Wed, 04 Sep 2013 17:06:35 -0600 |
parents | 40dfa49bda69 |
children | fe129ca366e4 |
files | ChangeLog lib/glob.c lib/glob.in.h |
diffstat | 3 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Aug 28 18:49:38 2013 -0700 +++ b/ChangeLog Wed Sep 04 17:06:35 2013 -0600 @@ -1,3 +1,11 @@ +2013-09-04 Eric Blake <eblake@redhat.com> + + glob: avoid -Wattribute warnings on glibc + * lib/glob.c (next_brace_sub, prefix_array, collated_compare): Use + __THROWNL, not __THROW, on static functions. + * lib/glob.in.h (__THROW): Adjust... + (__THROWNL): ...accordingly. + 2013-08-28 Paul Eggert <eggert@cs.ucla.edu> headers: check that _GL_INLINE_HEADER_BEGIN is defined
--- a/lib/glob.c Wed Aug 28 18:49:38 2013 -0700 +++ b/lib/glob.c Wed Sep 04 17:06:35 2013 -0600 @@ -162,7 +162,7 @@ # define GET_LOGIN_NAME_MAX() (-1) #endif -static const char *next_brace_sub (const char *begin, int flags) __THROW; +static const char *next_brace_sub (const char *begin, int flags) __THROWNL; #endif /* !defined _LIBC || !defined GLOB_ONLY_P */ @@ -210,8 +210,8 @@ attribute_hidden; #if !defined _LIBC || !defined GLOB_ONLY_P -static int prefix_array (const char *prefix, char **array, size_t n) __THROW; -static int collated_compare (const void *, const void *) __THROW; +static int prefix_array (const char *prefix, char **array, size_t n) __THROWNL; +static int collated_compare (const void *, const void *) __THROWNL; /* Find the end of the sub-pattern in a brace expression. */
--- a/lib/glob.in.h Wed Aug 28 18:49:38 2013 -0700 +++ b/lib/glob.in.h Wed Sep 04 17:06:35 2013 -0600 @@ -40,8 +40,8 @@ # define __END_DECLS # endif #endif -#ifndef __THROW -# define __THROW +#ifndef __THROWNL +# define __THROWNL #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */