glob: avoid -Wattribute warnings on glibc
authorEric Blake <eblake@redhat.com>
Wed, 4 Sep 2013 23:06:35 +0000 (17:06 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 4 Sep 2013 23:06:35 +0000 (17:06 -0600)
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>
ChangeLog
lib/glob.c
lib/glob.in.h

index 949bb04..9183621 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index bf90a00..7ec066f 100644 (file)
 # define GET_LOGIN_NAME_MAX()   (-1)
 #endif
 \f
-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 @@ extern int __glob_pattern_type (const char *pattern, int quote)
     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.  */
index 49e15c0..c242d97 100644 (file)
@@ -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.  */