From: Jo Sutton Date: Mon, 1 Jul 2024 03:55:13 +0000 (+1200) Subject: s3:smbd: Avoid compiler warning for unused label X-Git-Tag: tdb-1.4.11~220 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03e9575e38d737e0972d4736a80949dcdb515c44;p=thirdparty%2Fsamba.git s3:smbd: Avoid compiler warning for unused label 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 --- 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.