From 9cc4a6928da3931d0d7d6afad4489384cb21de23 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 20 Nov 2023 17:18:10 +0100 Subject: bindfs.c: Address warning -Wunused-function Symptom with GCC 13: > bindfs.c:1470:12: error: 'bindfs_flock' defined but not used [-Werror=unused-function] > static int bindfs_flock(const char *path, struct fuse_file_info *fi, int op) > ^~~~~~~~~~~~ > bindfs.c:1458:12: error: 'bindfs_lock' defined but not used [-Werror=unused-function] > static int bindfs_lock(const char *path, struct fuse_file_info *fi, int cmd, > ^~~~~~~~~~~ --- src/bindfs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/bindfs.c b/src/bindfs.c index 033e3a4..72f11ec 100644 --- a/src/bindfs.c +++ b/src/bindfs.c @@ -316,9 +316,11 @@ static int bindfs_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi); static int bindfs_write(const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fi); +#if defined(HAVE_FUSE_29) || defined(HAVE_FUSE_3) static int bindfs_lock(const char *path, struct fuse_file_info *fi, int cmd, struct flock *lock); static int bindfs_flock(const char *path, struct fuse_file_info *fi, int op); +#endif #ifdef HAVE_FUSE_3 static int bindfs_ioctl(const char *path, int cmd, void *arg, struct fuse_file_info *fi, unsigned int flags, @@ -1454,6 +1456,7 @@ static int bindfs_write(const char *path, const char *buf, size_t size, return res; } +#if defined(HAVE_FUSE_29) || defined(HAVE_FUSE_3) /* This callback is only installed if lock forwarding is enabled. */ static int bindfs_lock(const char *path, struct fuse_file_info *fi, int cmd, struct flock *lock) @@ -1476,6 +1479,7 @@ static int bindfs_flock(const char *path, struct fuse_file_info *fi, int op) } return 0; } +#endif #ifdef HAVE_FUSE_3 static int bindfs_ioctl(const char *path, int cmd, void *arg, -- cgit v1.2.3