aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_lowlevel.h
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2025-02-17 23:39:04 +0100
committerBernd Schubert <bernd@bsbernd.com>2025-02-18 18:45:58 +0100
commitf8bdca32b4dfbed4b21a69dcc751cdcbf8b2d58e (patch)
treec610e07df140ca886e61d38a04a1c85fdaac4b64 /include/fuse_lowlevel.h
parent619538e5d5cd19ee3e3919dea223464285d3cb8a (diff)
downloadlibfuse-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 'include/fuse_lowlevel.h')
-rw-r--r--include/fuse_lowlevel.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index b03b37a..93bcba2 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -2049,6 +2049,12 @@ int fuse_parse_cmdline_312(struct fuse_args *args,
#endif
#endif
+/* Do not call this directly, use fuse_session_new() instead */
+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);
+
/**
* Create a low level session.
*
@@ -2088,12 +2094,6 @@ fuse_session_new_fn(struct fuse_args *args, const struct fuse_lowlevel_ops *op,
.padding = 0
};
- /* not declared globally, to restrict usage of this function */
- 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);
-
return fuse_session_new_versioned(args, op, op_size, &version,
userdata);
}