* lib/file-has-acl.c: Include attribute.h.
(have_xattr): Declare with ATTRIBUTE_PURE,
to avoid new warning from GCC14-to-be.
* modules/file-has-acl (Depends-on): Add attribute.
Spotted while building coreutils with this:
gcc version 14.0.0
20230526 (experimental)
+2023-05-28 Jim Meyering <meyering@fb.com>
+
+ file-has-acl: avoid warning from bleeding-edge GCC
+ * lib/file-has-acl.c: Include attribute.h.
+ (have_xattr): Declare with ATTRIBUTE_PURE,
+ to avoid new warning from GCC14-to-be.
+ * modules/file-has-acl (Depends-on): Add attribute.
+ Spotted while building coreutils with this:
+ gcc version 14.0.0 20230526 (experimental)
+
2023-05-28 Bruno Haible <bruno@clisp.org>
error: Avoid -Wint-in-bool-context warning.
#include "acl.h"
#include "acl-internal.h"
-
+#include "attribute.h"
#include "minmax.h"
#if USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR
/* Return true if ATTR is in the set represented by the NUL-terminated
strings in LISTBUF, which is of size LISTSIZE. */
-static bool
+ATTRIBUTE_PURE static bool
have_xattr (char const *attr, char const *listbuf, ssize_t listsize)
{
char const *blim = listbuf + listsize;
Depends-on:
acl-permissions
+attribute
extern-inline
minmax
free-posix