From c6ae7425aa9cac34e5ce320b1ac3a09753f6c66f Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Mon, 17 Feb 2025 23:39:04 +0100 Subject: 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 --- lib/fuse.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'lib/fuse.c') diff --git a/lib/fuse.c b/lib/fuse.c index 6c69a68..9335429 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -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, -- cgit v1.2.3