From: Noel Power Date: Tue, 13 Aug 2019 14:36:56 +0000 (+0100) Subject: s3/libsmb: clang: Fix 'Value stored to 'create_options' is never read' X-Git-Tag: talloc-2.3.1~270 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4995a0e7e05c4affc9f1f7992cef54e57d9efdc0;p=thirdparty%2Fsamba.git s3/libsmb: clang: Fix 'Value stored to 'create_options' is never read' It looks like the create_options are accumulated as the depending on the failure reasons returned for cli_smb2_create_fnum (except for when a directory is encountered) this looks like a mistake Fixes: source3/libsmb/cli_smb2_fnum.c:1870:3: warning: Value stored to 'create_options' is never read <--[clang] create_options |= FILE_DIRECTORY_FILE; ^ Signed-off-by: Noel Power Reviewed-by: Ralph Boehme --- diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index 535beaab841..15f1420dd8f 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -1876,7 +1876,7 @@ static NTSTATUS get_fnum_from_path(struct cli_state *cli, FILE_ATTRIBUTE_DIRECTORY, /* file attributes */ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, /* share_access */ FILE_OPEN, /* create_disposition */ - FILE_DIRECTORY_FILE, /* create_options */ + create_options, /* create_options */ NULL, pfnum, NULL,