From 03e9575e38d737e0972d4736a80949dcdb515c44 Mon Sep 17 00:00:00 2001 From: Jo Sutton Date: Mon, 1 Jul 2024 15:55:13 +1200 Subject: [PATCH] s3:smbd: Avoid compiler warning for unused label MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If either of HAVE_FSTATFS and HAVE_LINUX_MAGIC_H are not defined, gcc produces the following error: ../../source3/smbd/open.c: In function ‘reopen_from_fsp’: ../../source3/smbd/open.c:1222:1: error: label ‘namebased_open’ defined but not used [-Werror=unused-label] 1222 | namebased_open: | ^~~~~~~~~~~~~~ Signed-off-by: Jo Sutton Reviewed-by: Martin Schwenke Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Tue Jul 2 04:44:56 UTC 2024 on atb-devel-224 --- source3/smbd/open.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 3b1e9700db3..0c101c19b46 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1219,7 +1219,9 @@ static NTSTATUS reopen_from_fsp(struct files_struct *dirfsp, return NT_STATUS_OK; } +#if defined(HAVE_FSTATFS) && defined(HAVE_LINUX_MAGIC_H) namebased_open: +#endif /* * Close the existing pathref fd and set the fsp flag * is_pathref to false so we get a "normal" fd this time. -- 2.47.2