summaryrefslogtreecommitdiffstats
path: root/src/fsade.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-11-15 10:04:57 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-11-15 10:04:57 -0500
commitf4e8084414e07a8e03cb279090bbcf9eea76ed1e (patch)
treeabdd3472df66c5661e494a0e5bf358b1ee8124ea /src/fsade.c
parentfb4760db85c552b0f538f7af2ad40fa631c20540 (diff)
downloadbfs-f4e8084414e07a8e03cb279090bbcf9eea76ed1e.tar.xz
config: New attr_maybe_unused macro
Diffstat (limited to 'src/fsade.c')
-rw-r--r--src/fsade.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fsade.c b/src/fsade.c
index cbff47b..4d22d99 100644
--- a/src/fsade.c
+++ b/src/fsade.c
@@ -28,12 +28,11 @@
# include <sys/xattr.h>
#endif
-#if BFS_CAN_CHECK_ACL || BFS_CAN_CHECK_CAPABILITIES || BFS_CAN_CHECK_XATTRS
-
/**
* Many of the APIs used here don't have *at() variants, but we can try to
* emulate something similar if /proc/self/fd is available.
*/
+attr_maybe_unused
static const char *fake_at(const struct BFTW *ftwbuf) {
static atomic int proc_works = -1;
@@ -67,6 +66,7 @@ fail:
return ftwbuf->path;
}
+attr_maybe_unused
static void free_fake_at(const struct BFTW *ftwbuf, const char *path) {
if (path != ftwbuf->path) {
dstrfree((dchar *)path);
@@ -76,6 +76,7 @@ static void free_fake_at(const struct BFTW *ftwbuf, const char *path) {
/**
* Check if an error was caused by the absence of support or data for a feature.
*/
+attr_maybe_unused
static bool is_absence_error(int error) {
// If the OS doesn't support the feature, it's obviously not enabled for
// any files
@@ -114,8 +115,6 @@ static bool is_absence_error(int error) {
return false;
}
-#endif // BFS_CAN_CHECK_ACL || BFS_CAN_CHECK_CAPABILITIES || BFS_CAN_CHECK_XATTRS
-
#if BFS_CAN_CHECK_ACL
/** Check if a POSIX.1e ACL is non-trivial. */