diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2023-11-20 17:18:10 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2023-11-20 18:36:08 +0100 |
commit | 9cc4a6928da3931d0d7d6afad4489384cb21de23 (patch) | |
tree | 518a670eeb34439320c3117557a3f7510295035d | |
parent | 8408e5f5e64e01630b64304db8971e074ab0b25a (diff) | |
download | bindfs-9cc4a6928da3931d0d7d6afad4489384cb21de23.tar.gz |
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,
> ^~~~~~~~~~~
-rw-r--r-- | src/bindfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
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, |