diff options
author | Bernd Schubert <bschubert@ddn.com> | 2025-02-17 23:39:04 +0100 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-02-18 18:45:58 +0100 |
commit | f8bdca32b4dfbed4b21a69dcc751cdcbf8b2d58e (patch) | |
tree | c610e07df140ca886e61d38a04a1c85fdaac4b64 /lib | |
parent | 619538e5d5cd19ee3e3919dea223464285d3cb8a (diff) | |
download | libfuse-f8bdca32b4dfbed4b21a69dcc751cdcbf8b2d58e.tar.gz |
Avoid nested function declarations in helper functions
libfuse-3.17 introduced several functions that should only be called via
inlined helper functions, never directly. To enforce this, these functions
were declared within the inlined functions. However, this triggers the
compiler warning "-Werror=nested-externs".
While this warning is valid, the nested declarations were intentional to
prevent direct usage of these functions. Rather than suppressing the
warning with pragmas, move these function declarations outside the helper
functions while maintaining the intended access restrictions through other
means.
Closes: https://github.com/libfuse/libfuse/issues/1134
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse.c | 13 | ||||
-rw-r--r-- | lib/fuse_lowlevel.c | 4 | ||||
-rw-r--r-- | lib/helper.c | 4 |
3 files changed, 2 insertions, 19 deletions
@@ -4924,13 +4924,8 @@ void fuse_stop_cleanup_thread(struct fuse *f) * through the fuse_new macro */ struct fuse *_fuse_new_31(struct fuse_args *args, - const struct fuse_operations *op, - size_t op_size, struct libfuse_version *version, - void *user_data); -struct fuse *_fuse_new_31(struct fuse_args *args, - const struct fuse_operations *op, - size_t op_size, struct libfuse_version *version, - void *user_data) + const struct fuse_operations *op, size_t op_size, + struct libfuse_version *version, void *user_data) { struct fuse *f; struct node *root; @@ -5075,10 +5070,6 @@ out: } /* Emulates 3.0-style fuse_new(), which processes --help */ -struct fuse *_fuse_new_30(struct fuse_args *args, const struct fuse_operations *op, - size_t op_size, - struct libfuse_version *version, - void *user_data); FUSE_SYMVER("_fuse_new_30", "_fuse_new@FUSE_3.0") struct fuse *_fuse_new_30(struct fuse_args *args, const struct fuse_operations *op, diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index e3e79d5..d650944 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -3247,10 +3247,6 @@ int fuse_session_receive_buf_internal(struct fuse_session *se, struct fuse_session * fuse_session_new_versioned(struct fuse_args *args, const struct fuse_lowlevel_ops *op, size_t op_size, - struct libfuse_version *version, void *userdata); -struct fuse_session * -fuse_session_new_versioned(struct fuse_args *args, - const struct fuse_lowlevel_ops *op, size_t op_size, struct libfuse_version *version, void *userdata) { int err; diff --git a/lib/helper.c b/lib/helper.c index a1cf98c..a7b2fe0 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -304,10 +304,6 @@ int fuse_daemonize(int foreground) return 0; } -/* Not symboled, as not part of the official API */ -int fuse_main_real_versioned(int argc, char *argv[], - const struct fuse_operations *op, size_t op_size, - struct libfuse_version *version, void *user_data); int fuse_main_real_versioned(int argc, char *argv[], const struct fuse_operations *op, size_t op_size, struct libfuse_version *version, void *user_data) |