mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-09-01 02:34:55 +00:00
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)
This commit is contained in:
committed by
Jim Meyering
parent
4f7dce3fc2
commit
2bd4c8dc13
@@ -1,3 +1,13 @@
|
||||
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.
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@
|
||||
#include "acl.h"
|
||||
|
||||
#include "acl-internal.h"
|
||||
|
||||
#include "attribute.h"
|
||||
#include "minmax.h"
|
||||
|
||||
#if USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR
|
||||
@@ -50,7 +50,7 @@ enum {
|
||||
/* 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;
|
||||
|
||||
@@ -8,6 +8,7 @@ m4/acl.m4
|
||||
|
||||
Depends-on:
|
||||
acl-permissions
|
||||
attribute
|
||||
extern-inline
|
||||
minmax
|
||||
free-posix
|
||||
|
||||
Reference in New Issue
Block a user